• I’m trying out this plugin, and wanted to do_shortcode in the child themes’ php files, rather than using it in widget or post. And, I realized that when I do:

    <?php echo do_shortcode([woocommerce_currency_switcher_drop_down_box]); ?>

    It returned the text “Array” and, if I removed echo, nothing is return.

    May I know whether this is the right way to do it.

Viewing 1 replies (of 1 total)
  • Gal Baras

    (@galbaras)

    You need to put quotes around the shortcode:

    do_shortcode( ‘[woocommerce_currency_switcher_drop_down_box]’ );

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