{"id":351553,"date":"2026-08-13T13:47:56","date_gmt":"2026-08-13T13:47:56","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/allow-only-1-category-in-cart-for-woocommerce\/"},"modified":"2026-09-08T08:55:03","modified_gmt":"2026-09-08T08:55:03","slug":"cartrules-one-category-in-cart-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/br.wordpress.org\/plugins\/cartrules-one-category-in-cart-for-woocommerce\/","author":11816692,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.4","stable_tag":"1.0.4","tested":"7.1.1","requires":"6.5","requires_php":"7.4","requires_plugins":null,"header_name":"CartRules One Category in Cart for WooCommerce","header_author":"Rodolfo Melogli","header_description":"Restrict the WooCommerce cart to products from a single product category at a time.","assets_banners_color":"345ab1","last_updated":"2026-09-08 08:55:03","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/businessbloomer.com\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":233,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"BusinessBloomer","date":"2026-08-13 13:47:33","revision":3645514},"1.0.2":{"tag":"1.0.2","author":"BusinessBloomer","date":"2026-08-26 10:45:07","revision":3666799},"1.0.3":{"tag":"1.0.3","author":"BusinessBloomer","date":"2026-09-08 08:12:31","revision":3686184},"1.0.4":{"tag":"1.0.4","author":"BusinessBloomer","date":"2026-09-08 08:55:03","revision":3686238}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3686238,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3686238,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3645514,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3645514,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.2","1.0.3","1.0.4"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[3047,3148,13352,275525,286],"plugin_category":[45],"plugin_contributors":[275526],"plugin_business_model":[],"class_list":["post-351553","plugin","type-plugin","status-publish","hentry","plugin_tags-cart","plugin_tags-checkout","plugin_tags-product-category","plugin_tags-restrict-cart","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-businessbloomer","plugin_committers-businessbloomer"],"banners":{"banner":"https:\/\/ps.w.org\/cartrules-one-category-in-cart-for-woocommerce\/assets\/banner-772x250.png?rev=3645514","banner_2x":"https:\/\/ps.w.org\/cartrules-one-category-in-cart-for-woocommerce\/assets\/banner-1544x500.png?rev=3645514","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/cartrules-one-category-in-cart-for-woocommerce\/assets\/icon-128x128.png?rev=3686238","icon_2x":"https:\/\/ps.w.org\/cartrules-one-category-in-cart-for-woocommerce\/assets\/icon-256x256.png?rev=3686238","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin stops customers from mixing products from different categories in the same order. If a product is already in the cart, adding a product from a different category will either be blocked, or the cart will be emptied first, depending on the option you choose.<\/p>\n\n<p>This is useful for stores that need to keep certain product categories separate at checkout, for example because they need different shipping, come from different suppliers, or are fulfilled differently.<\/p>\n\n<p>Once activated, go to WooCommerce &gt; Settings &gt; CartRules &gt; One Category in Cart to turn the restriction on and choose what should happen.<\/p>\n\n<p>Works with both the classic, shortcode-based cart and checkout, and the newer WooCommerce Cart and Checkout blocks.<\/p>\n\n<h4>Why upgrade to CartRules PRO?<\/h4>\n\n<p>This plugin only restricts the cart by category. CartRules One in Cart PRO replaces it, and every other free CartRules plugin, with a single plugin that handles every rule type and gives you more control over how each one behaves.<\/p>\n\n<p><strong>Every rule type, in one plugin<\/strong><\/p>\n\n<ul>\n<li>Category, tag, brand, shipping class, product type, any custom taxonomy, or individual products, instead of installing a separate plugin per rule type.<\/li>\n<li>Unlimited rules, each with its own settings, managed from one screen: WooCommerce &gt; Settings &gt; CartRules &gt; One in Cart PRO.<\/li>\n<\/ul>\n\n<p><strong>More control per rule<\/strong><\/p>\n\n<ul>\n<li>Scope a rule to specific groups instead of \"any one at a time\" (for example, only keep \"Gift Cards\" separate, and let everything else mix freely).<\/li>\n<li>Choose what happens when a rule is broken: block the new product with a message, or empty the cart and add it, decided separately for each rule.<\/li>\n<li>Flags other cart restrictions already running on your store, whether from a free CartRules plugin or your own custom code, so two rules never silently conflict.<\/li>\n<li>Works with both the classic cart and checkout and the WooCommerce Cart and Checkout blocks.<\/li>\n<\/ul>\n\n<p><a href=\"https:\/\/cartrules.com\/product\/cartrules-one-in-cart-pro\/\">Get CartRules One in Cart PRO \u2192<\/a><\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin folder to <code>\/wp-content\/plugins\/<\/code>, or install it through the Plugins menu in WordPress directly.<\/li>\n<li>Activate the plugin through the Plugins menu in WordPress.<\/li>\n<li>Go to WooCommerce &gt; Settings &gt; CartRules &gt; One Category in Cart to turn the restriction on and choose what should happen.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"is%20there%20a%20version%20that%20combines%20multiple%20rule%20types%3F\"><h3>Is there a version that combines multiple rule types?<\/h3><\/dt>\n<dd><p>Yes. CartRules One in Cart PRO lets you combine category, tag, brand, shipping class, and product type restrictions in one plugin, with unlimited rules and more advanced conditions.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20a%20product%20belongs%20to%20more%20than%20one%20category%3F\"><h3>What happens if a product belongs to more than one category?<\/h3><\/dt>\n<dd><p>It's allowed, as long as it shares at least one category with what's already in the cart.<\/p><\/dd>\n<dt id=\"does%20this%20work%20with%20variable%20products%3F\"><h3>Does this work with variable products?<\/h3><\/dt>\n<dd><p>Yes, it works with all product types.<\/p><\/dd>\n<dt id=\"does%20this%20work%20with%20the%20woocommerce%20cart%20and%20checkout%20blocks%2C%20or%20only%20the%20classic%20shortcode-based%20cart%3F\"><h3>Does this work with the WooCommerce Cart and Checkout blocks, or only the classic shortcode-based cart?<\/h3><\/dt>\n<dd><p>Both. The restriction is applied when a product is added to the cart, so it works the same way whether your store uses the classic cart\/checkout pages or the block-based versions.<\/p><\/dd>\n<dt id=\"does%20this%20affect%20orders%20created%20or%20edited%20from%20wp-admin%3F\"><h3>Does this affect orders created or edited from wp-admin?<\/h3><\/dt>\n<dd><p>No, the restriction only applies to the storefront cart. Orders added or changed from wp-admin are not affected.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Fixed uneven spacing above the icon and below the plugin name on the plugin thumbnail<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>New icon<\/li>\n<li>Added an \"Upgrade to CartRules PRO\" section to the description and settings page<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Fixed the deny\/replace notice showing up blank when the restriction is enabled without saving the settings screen first (e.g. via WP-CLI)<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Fixed a settings section conflict that could occur when another CartRules plugin is active at the same time<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"This plugin ensures customers can only buy products from one category at a time.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/351553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=351553"}],"author":[{"embeddable":true,"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/businessbloomer"}],"wp:attachment":[{"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=351553"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=351553"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=351553"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=351553"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=351553"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/br.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=351553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}