Resolvedbranch and order type info box

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #38442
    mlothropprice
    Participant

    I want to add the branch and order type info box to my order online page. Is there a list of shortcodes documented? I dont see the element in my WPbakery Page Builder.

    In the Lafka Shipping Settings tab there is not an option to choose any page you want the box added to.

    #38445
    Alex
    Keymaster

    Hello mlothropprice,

    There is no shortcode for it.

    You can add following in your child theme:

    function branches_shortcode($atts) {
        $atts = shortcode_atts(array(
            'id' => '',
        ), $atts, 'branches');
        
        static $content = array(); // declare a static variable to store the content
        
        if (!isset($content[$atts['id']])) {
            ob_start(); // start output buffering
            
            Lafka_Branch_Locations::show_change_branch();
            
            $content[$atts['id']] = ob_get_clean(); // get the buffered output
        }
        
        return $content[$atts['id']];
    }
    add_shortcode('branches', 'branches_shortcode');
    

    Regards,
    Alex

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

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register