Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter lunkerlab

    (@lunkerlab)

    Thanks for the help! With my fairly basic understanding of php, I had a hard time trying to figure out where & how to place the custom attribute… I did fine the shipping method that handles the shipping package numbers in the “wc-cart-functions.php” file. I then used this function to only change the “shipping 2” text

    add_filter( ‘woocommerce_shipping_package_name’ , ‘custom_shipping_package_name’, 10, 3);
    function custom_shipping_package_name($package_name, $i, $package){
    return sprintf( _nx( ‘Shipping’, ‘Custom Shipping Name %d’, ( $i + 1 ), ‘shipping packages’, ‘nl_nl’ ), ( $i + 1 ) );
    }

    Not sure if this is a total hack job code wise (any advice would be appreciated)… Now I just need to figure out how to remove the variable that adds the number without breaking the function. Thanks Again!!

Viewing 1 replies (of 1 total)