• Resolved lissior

    (@lissior)


    Hello. I have a problem with the shortcode from this page:

    https://yithemes.com/docs-plugins/yith-woocommerce-waiting-list/shortcode.html

    I need to display button “add to waitlist” in another plugin.
    Unfortunately this shortcode does not work on any page.
    I tested it on content-single-product but nothing happens:

    <?php echo do_shortcode(‘[ywcwtl_form product_id = “‘.$product->id.'”]’); ?>
    <?php echo do_shortcode(‘[ywcwtl_form product_id=”39″]’); ?>

    I’m using a demo version 1.1.2.

    Shortcode probably does not work on all themes. I tested:
    – Ultrabootstrap,
    – Storefront,
    – Twenty Sixteen.

    Please help

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter lissior

    (@lissior)

    Ok, it work!

    <?php echo do_shortcode(‘[ywcwtl_form product_id = “‘.$product->id.’”]’); ?>

    <?php echo do_shortcode(‘[ywcwtl_form product_id = “‘.$product->variation_id.’”]’); ?>

    • This reply was modified 6 years, 10 months ago by lissior.
    Plugin Author YITHEMES

    (@yithemes)

    Hi,
    great! If you are using a WC version greater then 3.0 I suggest you to change the code in this way.
    <?php echo do_shortcode(‘[ywcwtl_form product_id = “‘.$product->get_id().’”]’); ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using shortcode’ is closed to new replies.