Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
- remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart');
- add_filter('woocommerce_is_purchasable', 'prfx_is_product_purchasbale');
- function prfx_is_product_purchasbale($purchasable, $product) {
- // you could check agains a meta option, or maybe if a shortcode exists in this product
- if ($product->id == 132) {
- $purchasable = false;
- }
- return $purchasable;
- }
- <a href="<insert your home-url>/product-inquiry/?product-title=<insert your product-title>&product-id=<insert your product-id>">Product Inquiry</a>
- [getparam product-title][getparam product-id]
- <p>Inquiry for product: [showparam product-title] ([showparam product-id]) </p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement