Change position / priority for linked variations
-
Hello,
Is it possible to change priority for the linked variation swatches OR quantity discount table in single products? For now the linked variations swatches is positioned above the quantity discount table.
Brgds
Rune
Hello,
Try to use the Theme’s Layout Builder, you can create Custom Layouts for WooCommerce pages like the Single Product page. You can use that to create your own custom layouts for a single product page and rearrange the elements in the layout.
Further, you can read more about the Layout Builder here: https://xtemos.com/docs-topic/woodmart-woocommerce-layout-builder/
Best Regards
Hello,
Thank you, but a lot easier if you can provide a way to access this action:
add_action( ‘woocommerce_single_product_summary’, array( $this, ‘render_dynamic_discounts_table’ ), 25 );
I need to change priority to 24
Brgds
Rune
Problem solved using below function:
// Change position / priority for quantity discount table
add_action( 'init', function() {
remove_action( 'woocommerce_single_product_summary', [ XTS\Modules\Dynamic_Discounts\Frontend::get_instance(), 'render_dynamic_discounts_table' ], 25 );
add_action( 'woocommerce_single_product_summary', [ XTS\Modules\Dynamic_Discounts\Frontend::get_instance(), 'render_dynamic_discounts_table' ], 24 );
}, 10);
Brgds
Rune
Hello,
You are Most Welcome.
We are glad that you managed to solve the problem yourself. You are Great!!!
Let us know if there’s anything else we can do for you! You can always reach us at any time. We are always here to help you.
Have a wonderful day.
Topic Closed.
Best Regards.
The topic ‘Change position / priority for linked variations’ is closed to new replies.