AI Verified

Name

Make Woocommerce product not purchasable

About

If you have items that can't be sold (for instance a overview of companies) disable the possibility of purchasing.

Language

PHP

Rating

Voted: 0 by 0 user(s)

How to Setup Snippet

enable and go!

Codevault

Lexvd

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: Not Specified

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

History

Last modified:

14/11/2022

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Make Woocommerce product not purchasable

 
                    
1add_filter( 'woocommerce_is_purchasable', '__return_false' );
2remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
3remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );

0

Related Snippets

Please see some snippets below related to this snippet..

WooCommerce

AI Verified

0

WooCommerce Display Product Specific Content Under Add To Cart Button On Archive Loop

Added: 1 year ago

Last Updated: 1 year ago

Do you want to be able to display product specific information under the add to cart button on the product loop item which appears on the product archive page? Maybe you want to let customers know of...

WooCommerce

AI Verified

1

WooCommerce Confirm Email On Registration Form

Added: 1 year ago

Last Updated: 1 day ago

This snippet generates a new custom field on the registration form which asks the user to confirm their email address (enter it a second time). By asking the user to confirm their email address, mista...

WooCommerce

AI Verified

0

WC Change Add To Cart Button Text (Archive Page)

Added: 1 year ago

Last Updated: 1 year ago

Change the Add To Cart button text on the archive pages of WooCommerce

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

WordPress Admin

AI Verified

3

Infinite media library scrolling

Added: 1 year ago

Last Updated: 8 months ago

With this snippet your media library will scroll for infinity and beyond!

WooCommerce

AI Verified

1

Move add to card button underneath the price for Woocommerce product pages

Added: 1 year ago

Last Updated: 1 year ago

I always like to have the add to card button underneath the price ( I mean there is where you buy)

WooCommerce

AI Verified

0

Gutenberg for Woocommerce product pages

Added: 1 year ago

Last Updated: 1 year ago

Want to use Gutenberg for Woocommerce? This snippet will make it happen (but might be useless in the future though)