• Resolved kare93

    (@kare93)


    Hello,

    I have a request for your plugin. Is it possible to display the name of shipping method in print page? Do We need to create a shortcode to get it?

    Thanks in advance.

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

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

    (@kare93)

    Please help me.

    I am waiting for your response!

    Thank you.

    Hi @kare93

    Apologies for the delay in response.

    Yes, it is possible to display the name of the shipping method on the print page. For that, you will need to add the below code snippet in the functions.php file of your active theme.
    Code :

    function example_custom_order_fields( $fields, $order ) {
        $new_fields = array();
        $new_fields['shipping_method'] = array( 
            'label' => 'Shipping Method',
            'value' => $order->get_shipping_method()
            );
        return array_merge( $fields, $new_fields );
    }
    add_filter( 'wcdn_order_info_fields', 'example_custom_order_fields', 10, 2 );

    Please let us know how it goes.

    Regards,
    Shasvat shah

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shipping Method in print’ is closed to new replies.