Viewing 1 replies (of 1 total)
  • pitusp

    (@pitusp)

    You should be able to add text content with the [wcpbc_country_selector] shortcode, which will use the country-selector.php template, but, if it appears at a wrong place (like it did for me on another theme), you can try creating your own shortcode which will capture the output of [wcpbc_country_selector] and return it properly.

    Here’s an example of how I did it using [my_country_selector] shortcode, added to functions.php of a child-theme (so that I don’t have to mess with the original file).

    See Shorcode_API and Creating Child Theme for more details (that’s what I’ve based mine on):

    function my_country_selector() {
        if( is_page('checkout') ) // don't show it on the Checkout page
            return '';
        ob_start();
        do_shortcode("[wcpbc_country_selector]");
        return o_get_clean();
    }
    add_shorcode( 'my_country_selector', 'my_country_selector' );
Viewing 1 replies (of 1 total)
  • The topic ‘Help with country selector’ is closed to new replies.