Hi,
I’m trying to display the variable discount table in a tab on single product page.
I want to use a shortcode and found this:
./inc/modules/layouts/wpb/shortcodes/single-product/dynamic-discounts-table.php
I tried to use it by adding the following to my functions.php
// Custom shortcode to display the dynamic discounts table
function display_woodmart_dynamic_discounts_table() {
// Check if the Woodmart function exists
if ( function_exists( ‘woodmart_shortcode_single_product_dynamic_discounts_table’ ) ) {
// Call the Woodmart function to render the discounts table
return woodmart_shortcode_single_product_dynamic_discounts_table( array() );
} else {
return ‘<p>Dynamic discounts not available.</p>’;
}
}
add_shortcode(‘dynamic_discounts_table’, ‘display_woodmart_dynamic_discounts_table’);
and then display it in the tab using shortcode [dynamic_discounts_table] but its not working.
Is there a way I can show the discount table in a tab?