Custom code compatibility
-
Hello,
I have the following code which works without problem in a base installation, now when I have your plugin active the code doesn’t work.
add_action( 'woocommerce_variable_add_to_cart', 'update_price_with_variation_price' ); function update_price_with_variation_price() { global $product; $price = $product->get_price_html(); wc_enqueue_js( " $(document).on('found_variation', 'form.cart', function( event, variation ) { if(variation.price_html) $('.summary > p.price').html(variation.price_html); $('.woocommerce-variation-price').hide(); }); $(document).on('hide_variation', 'form.cart', function( event, variation ) { $('.summary > p.price').html('" . $price . "'); }); " ); }
I understand that it could be due to the modifications of FOX variables.
This code basically modifies the price of the variable products so that a single price is displayed dynamically, and not the price range together with the price of the variable product below.
I stay tuned and I hope you can help me.
Greetings,
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Custom code compatibility’ is closed to new replies.