Skip to content

Instantly share code, notes, and snippets.

@rynaldos-zz
Last active February 3, 2017 08:03
Show Gist options
  • Save rynaldos-zz/0a1a777ff043f1aabd68a6f0a8020739 to your computer and use it in GitHub Desktop.
Save rynaldos-zz/0a1a777ff043f1aabd68a6f0a8020739 to your computer and use it in GitHub Desktop.
[WooCommerce] Table rates zero fees (append label)
function free_label_trs ( $label, $method ) {
if ( 0 == $method->cost && 'table_rate' == $method->method_id ) {
$label .= ' (' . __( 'Free', 'woocommerce-table-rate-shipping' ) . ')';
}
return $label;
}
add_filter( 'woocommerce_cart_shipping_method_full_label', 'free_label_trs', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment