Created
September 5, 2017 16:16
-
-
Save rayflores/f22b86cc5180d55ef7aa4d251fa68813 to your computer and use it in GitHub Desktop.
Add text to shipping label
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 | |
| add_filter( 'woocommerce_cart_shipping_method_full_label', 'add_free_to_free_shipping_label', 10, 2); | |
| function add_free_to_free_shipping_label( $label, $method ){ | |
| if ( $method->cost === '0.00' ){ | |
| $label = $label . ' (Free)'; | |
| } | |
| return $label; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment