Created
July 15, 2021 12:21
-
-
Save jorpdesigns/b0fa463381c411ee76b70627f934ce08 to your computer and use it in GitHub Desktop.
Snippet to remove WooCommerce shipping order labels
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// CART | |
add_filter( 'woocommerce_cart_shipping_method_full_label', 'remove_shipping_label', 9999, 2 ); | |
function remove_shipping_label( $label, $method ) { | |
$new_label = preg_replace( '/^.+:/', '', $label ); | |
return $new_label; | |
} | |
// ORDER EMAIL | |
add_filter( 'woocommerce_order_shipping_to_display_shipped_via', '__return_false' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment