• In these theme i have used shortcode to generate woocommerce compare button but i want to replace shortcode with the php function and i want to call function to display compare button but i am not able to find the function associated with the compare shortcode [yith_compare_button] kindly help me as soon as possible

    Thanks in advance

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi,
    and thank you for writing in!

    YITH WooCommerce Compare prints the shortcode [yith_compare_button] by using the compare_button_sc method of the YITH_Woocompare_Frontend class (in yith_woocommerce_compare/includes/class.yith-woocompare-frontend.php)

    However, to print the shortcode by using PHP you can use the following code snippet:
    echo do_shortcode('[yith_compare_button]');

Viewing 1 replies (of 1 total)
  • The topic ‘Regarding Shortcode’ is closed to new replies.