Home Forums WoodMart support forum using shortcode to display discounts in a tab

using shortcode to display discounts in a tab

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #598155

    barry-6678
    Participant

    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?

    #598251

    Luke Nielsen
    Keymaster

    Hello,

    Sorry to say but right now there is no option in Theme Settings available for that. It requires Customization and this is beyond our limitations and support policy scope. Hope you can understand our limitations.

    Kind Regards

Viewing 2 posts - 1 through 2 (of 2 total)