{"id":109630,"date":"2019-10-04T16:09:08","date_gmt":"2019-10-04T16:09:08","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/allow-only-1-product-in-cart-for-woocommerce\/"},"modified":"2025-07-18T04:44:34","modified_gmt":"2025-07-18T04:44:34","slug":"allow-only-1-product-in-cart-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/pl.wordpress.org\/plugins\/allow-only-1-product-in-cart-for-woocommerce\/","author":16284474,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2","stable_tag":"trunk","tested":"6.9.4","requires":"4.0","requires_php":"5.6","requires_plugins":null,"header_name":"Allow only 1 product in Cart","header_author":"MohammedYasar Khalifa","header_description":"This Plugin gives you the functionality when the user clicks on Add to Cart button it\u2019ll clear their previous cart data entirely and add new cart data, only allow one product purchase at a time.","assets_banners_color":"bc9ed3","last_updated":"2025-07-18 04:44:34","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/myasark.wordpress.com\/","header_plugin_uri":"","header_author_uri":"https:\/\/myasark.wordpress.com\/","rating":5,"author_block_rating":0,"active_installs":500,"downloads":5635,"num_ratings":9,"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":"yasirkhalifa","date":"2020-12-02 17:53:44"},"1.1":{"tag":"1.1","author":"yasirkhalifa","date":"2023-07-11 13:33:26"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":9},"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":3330029,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3330081,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3330086,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[3175,5593,245067,746,286],"plugin_category":[58],"plugin_contributors":[159497],"plugin_business_model":[],"class_list":["post-109630","plugin","type-plugin","status-publish","hentry","plugin_tags-add-to-cart","plugin_tags-customer","plugin_tags-one-product","plugin_tags-product","plugin_tags-woocommerce","plugin_category-user-management","plugin_contributors-yasirkhalifa","plugin_committers-yasirkhalifa"],"banners":{"banner":"https:\/\/ps.w.org\/allow-only-1-product-in-cart-for-woocommerce\/assets\/banner-772x250.png?rev=3330086","banner_2x":"https:\/\/ps.w.org\/allow-only-1-product-in-cart-for-woocommerce\/assets\/banner-1544x500.png?rev=3330081","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/allow-only-1-product-in-cart-for-woocommerce\/assets\/icon-256x256.png?rev=3330029","icon_2x":"https:\/\/ps.w.org\/allow-only-1-product-in-cart-for-woocommerce\/assets\/icon-256x256.png?rev=3330029","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin ensures that users can only purchase one product at a time.<br \/>\nWhen a logged-in user clicks the \"Add to Cart\" button, any existing cart content is cleared \u2014 allowing only the new product to remain.<\/p>\n\n<p>Perfect for scenarios like bookings, appointments, or exclusive product sales where only one item should be bought per order.<\/p>\n\n<p>Note: This plugin works <strong>only for logged-in users<\/strong>. Guest users are not affected.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>allow-only-1-product-in-cart<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory.  <\/li>\n<li>Activate the plugin through the \u2018Plugins\u2019 menu in WordPress.  <\/li>\n<li>Done! The plugin will now enforce one product per cart.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='q%3A%20will%20it%20work%20with%20variable%20or%20grouped%20products%3F'><h3>Q: Will it work with variable or grouped products?<\/h3><\/dt>\n<dd><p>A: Yes, the plugin works with all product types by clearing the cart before any product is added.<\/p><\/dd>\n<dt id='q%3A%20does%20it%20work%20for%20guest%20users%3F'><h3>Q: Does it work for guest users?<\/h3><\/dt>\n<dd><p>A: No, this plugin only works for logged-in users. Guest users are not affected.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2<\/h4>\n\n<ul>\n<li>Added internationalization support (i18n).<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Minor code changes.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Allows only one product in the cart at a time. Clears previous items when a new product is added. For logged-in users only.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/109630","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=109630"}],"author":[{"embeddable":true,"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/yasirkhalifa"}],"wp:attachment":[{"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=109630"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=109630"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=109630"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=109630"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=109630"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=109630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}