{"id":35241,"date":"2015-03-19T22:00:13","date_gmt":"2015-03-19T22:00:13","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/woocommerce-prevent-purchase\/"},"modified":"2025-11-02T21:05:40","modified_gmt":"2025-11-02T21:05:40","slug":"woocommerce-prevent-purchase","status":"publish","type":"plugin","link":"https:\/\/bal.wordpress.org\/plugins\/woocommerce-prevent-purchase\/","author":10539184,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.0","stable_tag":"1.1.0","tested":"6.8.5","requires":"3.3","requires_php":"","requires_plugins":null,"header_name":"Prevent Purchase for WooCommerce","header_author":"Andrew Munro","header_description":"","assets_banners_color":"","last_updated":"2025-11-02 21:05:40","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/andrew.dev","header_author_uri":"https:\/\/andrew.dev","rating":5,"author_block_rating":0,"active_installs":60,"downloads":2590,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation"],"tags":{"1.1.0":{"tag":"1.1.0","author":"sumobi","date":"2025-11-02 21:05:40"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[3711,1221,6883,286],"plugin_category":[45],"plugin_contributors":[78291],"plugin_business_model":[],"class_list":["post-35241","plugin","type-plugin","status-publish","hentry","plugin_tags-disable","plugin_tags-prevent","plugin_tags-purchase","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-sumobi","plugin_committers-sumobi"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/woocommerce-prevent-purchase.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin requires <a href=\"https:\/\/wordpress.org\/plugins\/woocommerce\/\" title=\"WooCommerce\">WooCommerce<\/a>. It allows the site owner to prevent a product from being purchased by enabling a checkbox. It also allows you to override the message on a per-product basis. This will be useful for when you want to let customers know a product is only available in-store but still have the product listed on your website.<\/p>\n\n<p>How does it work?<\/p>\n\n<p>This is a very simple plugin that hooks into WooCommerce's woocommerce_is_purchasable filter. When a product is deemed unpurchasable the \"add to cart\" button on the main product listing is replaced with a \"read more\" button. When the customer views the single product page they are shown a message that the product is not available for purchase and the add to cart buttons are removed.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Unpack the entire contents of this plugin zip file into your <code>wp-content\/plugins\/<\/code> folder locally<\/li>\n<li>Upload to your site<\/li>\n<li>Navigate to <code>wp-admin\/plugins.php<\/code> on your site (your WP Admin plugin page)<\/li>\n<li>Activate this plugin<\/li>\n<\/ol>\n\n<p>OR you can just install it with WordPress by going to Plugins &gt;&gt; Add New &gt;&gt; and type this plugin's name<\/p>\n\n<p>Go to a product's edit\/publish screen and enable the \"Prevent Purchase\" checkbox. Optionally you can enter in a custom message which is shown on the single product page.<\/p>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Plugin renamed to comply with WooCommerce trademark requirements<\/li>\n<li>Added nonce verification and security improvements<\/li>\n<li>Improved input sanitization and output escaping<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Prevents a product from being purchased","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/35241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=35241"}],"author":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/sumobi"}],"wp:attachment":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=35241"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=35241"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=35241"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=35241"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=35241"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=35241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}