• Resolved niikk

    (@niikk)


    Hello,

    We want to rename the Shipping: “Vendorname” lable on cart page.

    With this filter we are able to rename “Shipping:” to “Versand:”. But then the Vendor name is missing. How can we insert the Vendor name in this filter?

    Expected view: Versand: “Vendorname”

    add_filter( 'woocommerce_shipping_package_name', 'New_shipping_title' );
     
    function New_shipping_title() {
       return "Versand:";
    }

    Cheers

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @niikk,

    Thanks for your query.

    Please add the below code snippet to your child theme’s functions.php file.

    add_filter('dokan_shipping_package_name', 'change_shipping_pack_name', 10, 3);
        
        function change_shipping_pack_name($shipping_label, $i, $package){
            $user_id = $package['seller_id'];
            $store_info   = dokan_get_store_info( $user_id );
            return sprintf( '%s %s', __( 'Versand: ', 'dokan' ), !empty( $store_info['store_name'] ) ? $store_info['store_name'] : '' );
        }

    Best Regards,
    Tanjir

    Thread Starter niikk

    (@niikk)

    Hello @tanjiralmamun

    Perfect!

    Thank you very much! :))

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Rename Shipping: “vendor” label on cart page’ is closed to new replies.