r7asker
Forum Replies Created
-
Hi again,
I’m still trying to resolve this issue. Currently, I’m thinking that if I can use your plugin to set the unavailable options to £0 then all I have to do is prevent WooCommerce from adding products that are £0 to the cart. I’m trying this:
function remove_add_to_cart_on_0 ( $purchasable, $product ){ if( $product->get_price() == 0 ) $purchasable = false; return $purchasable; } add_filter( 'woocommerce_is_purchasable', 'remove_add_to_cart_on_0', 10, 2 );But it’s not working. Do you know why?
Ricky- This reply was modified 3 years, 6 months ago by r7asker.
Any ideas? We just need to be able to change this line “Unexpected token “end of expression” of value “” around position 1.”
Instead of this, if it said “Unavailable” that would be perfect. Any ideas?
Richard
Thanks for the response. Do you know if it’s possible to change the output response using PHP perhaps?
I understand. It’s working now and the plugin is great, thank you. I’ll buy you a coffee now!!
Hiya, that’s brought it back thank you!
Do you know why the HTML code isn’t working, though? Am I doing that wrong?
Hi Kryz,
I see. I didn’t realise your plugin hides the product price.
The website sells blinds. The product price is important because that the price per square metre. The calculated price the total due after the measurements have been applied.
The customer still needs to see the base price though. Ideally, somewhere near the product title. Is there a way to use HTML for this? Am I using the {product_price} code wrong?
Thanks!