Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xlplugins/74f105c9521337309a5358e03b80e769 to your computer and use it in GitHub Desktop.
Save xlplugins/74f105c9521337309a5358e03b80e769 to your computer and use it in GitHub Desktop.
Display 0.00 Instead of Free Text
add_filter( 'wc_cart_totals_shipping_method_cost', function ( $output ) {
if ( false !== strpos( $output, 'free' ) || false !== strpos( $output, 'Free' ) ) {
$output = wc_price( 0 );
}
return $output;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment