dirimmedia
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Hi @samganti we managed to fix our problem with the following function. It removed the extra total that was being displayed, and moved it under the product title.
function wck_custom_price_block(){ remove_action( 'woocommerce_before_add_to_cart_button', array('WCKalkulator\Woocommerce\Product', 'price_block') ); remove_action( 'woocommerce_after_add_to_cart_button', array('WCKalkulator\Woocommerce\Product', 'price_block') ); add_action('woocommerce_single_product_summary', array(\WCKalkulator\Woocommerce\Product::class, 'price_block')); } } add_action( 'wp_enqueue_scripts', 'wck_custom_price_block', 20 );
- This reply was modified 2 years, 2 months ago by dirimmedia.
We tried using the suggested action,
remove_action('woocommerce_before_add_to_cart_button', array(\WCKalkulator\Woocommerce\Product::class, 'price_block'));
but the issue persisted.
Hi @wckalkulator,
we managed to move forward.
add_action('woocommerce_single_product_summary', array(\WCKalkulator\Woocommerce\Product::class, 'price_block'));
did the trick. Afterwards, we ran into the issue of “Total” being displayed in the bottom (before add to cart) despite, adding the
remove_action
to the functions.php.Is there a workaround for it, or did we do something wrong?
Thanks in advance!
Viewing 3 replies - 1 through 3 (of 3 total)