{"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-08-13T13:47:33","modified_gmt":"2026-08-13T13:47:33","slug":"cartrules-one-category-in-cart-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/cartrules-one-category-in-cart-for-woocommerce\/","author":11816692,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.0.4","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-08-13 13:47:33","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":18,"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"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3645514,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3645514,"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"],"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=3645514","icon_2x":"https:\/\/ps.w.org\/cartrules-one-category-in-cart-for-woocommerce\/assets\/icon-256x256.png?rev=3645514","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<!--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=\"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.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:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/351553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=351553"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/businessbloomer"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=351553"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=351553"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=351553"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=351553"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=351553"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=351553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}