{"id":222126,"date":"2025-02-21T17:22:56","date_gmt":"2025-02-21T17:22:56","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/single-product-in-cart\/"},"modified":"2025-02-21T17:51:32","modified_gmt":"2025-02-21T17:51:32","slug":"single-product-in-cart","status":"publish","type":"plugin","link":"https:\/\/hr.wordpress.org\/plugins\/single-product-in-cart\/","author":23225827,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.1","stable_tag":"1.0.1","tested":"6.7.5","requires":"5.6","requires_php":"7.4","requires_plugins":null,"header_name":"Single Product in Cart","header_author":"Piyush Jangid","header_description":"Allows only one product in the cart at a time, replacing previous items when new ones are added.","assets_banners_color":"","last_updated":"2025-02-21 17:51:32","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/piyushjangid.in","rating":5,"author_block_rating":0,"active_installs":90,"downloads":631,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.1":{"tag":"1.0.1","author":"piyushjangid","date":"2025-02-21 17:51:32"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":1},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"Cart page showing a single product.","2":"Checkout page with only one product."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[3047,3148,282,66605,286],"plugin_category":[45],"plugin_contributors":[238613],"plugin_business_model":[],"class_list":["post-222126","plugin","type-plugin","status-publish","hentry","plugin_tags-cart","plugin_tags-checkout","plugin_tags-ecommerce","plugin_tags-single-product","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-piyushjangid","plugin_committers-piyushjangid"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/single-product-in-cart.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>The <strong>Single Product in Cart<\/strong> plugin ensures that only one product can exist in the WooCommerce cart at any given time. When a customer adds a new product to the cart, the plugin automatically removes any existing product and replaces it with the new one. This happens silently, without any warning messages.<\/p>\n\n<p>This plugin is ideal for stores that want to enforce a single-product purchase flow, such as subscription-based services, exclusive product sales, or limited-time offers.<\/p>\n\n<h3>Key Features:<\/h3>\n\n<ul>\n<li>Ensures only one product is in the cart at a time.<\/li>\n<li>Automatically replaces existing products when a new one is added.<\/li>\n<li>Works seamlessly with WooCommerce cart and checkout pages.<\/li>\n<li>No warning messages shown to customers during product replacement.<\/li>\n<li>Compatible with both simple and variable products.<\/li>\n<\/ul>\n\n<h3>Credits<\/h3>\n\n<p>Developed by <a href=\"https:\/\/piyushjangid.in\">Piyush Jangid<\/a>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>single-product-in-cart<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the <strong>Plugins<\/strong> menu in WordPress.<\/li>\n<li>Ensure WooCommerce is installed and activated.<\/li>\n<\/ol>\n\n<p>That's it! The plugin will automatically enforce a single-product cart.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id='does%20this%20plugin%20work%20with%20woocommerce%20subscriptions%3F'><h3>Does this plugin work with WooCommerce subscriptions?<\/h3><\/dt>\n<dd><p>Yes, it works with all WooCommerce product types, including subscriptions.<\/p><\/dd>\n<dt id='can%20customers%20adjust%20the%20quantity%20of%20the%20single%20product%3F'><h3>Can customers adjust the quantity of the single product?<\/h3><\/dt>\n<dd><p>Yes, customers can adjust the quantity of the single product in the cart.<\/p><\/dd>\n<dt id='what%20happens%20if%20a%20customer%20adds%20multiple%20products%20via%20a%20direct%20link%3F'><h3>What happens if a customer adds multiple products via a direct link?<\/h3><\/dt>\n<dd><p>The plugin ensures only the last added product remains in the cart, removing all others.<\/p><\/dd>\n<dt id='is%20this%20plugin%20compatible%20with%20woocommerce%20blocks%3F'><h3>Is this plugin compatible with WooCommerce Blocks?<\/h3><\/dt>\n<dd><p>Yes, it works seamlessly with WooCommerce Blocks and the classic cart\/checkout pages.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Fixed bugs and errors.<\/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 WooCommerce cart at a time. When a new product is added, it replaces the existing product without any warning.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/222126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=222126"}],"author":[{"embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/piyushjangid"}],"wp:attachment":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=222126"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=222126"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=222126"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=222126"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=222126"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=222126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}