hi. where i paste this code ?
Is possibile post it directly in my admin panel control, without open some file.php ?
tnx
/* Removes Standard Flat Rate Shipping Option when Free Shipping is available */
add_filter( ‘woocommerce_package_rates’, ‘unset_shipping_when_free_is_available_in_zone’, 10, 2 );
function unset_shipping_when_free_is_available_in_zone( $rates, $package ) {
// Removes Standard Flat Rate Shipping Option for Local Delivery Zone
if ( isset( $rates[‘free_shipping:10’] ) ) {
unset( $rates[‘flat_rate:13’] );
}
// Removes Standard Flat Rate Shipping Option for UK Delivery Zone
if ( isset( $rates[‘free_shipping:7’] ) ) {
unset( $rates[‘flat_rate:1’] );
}
return $rates;
}