add this please (remove the old one)
add_filter( 'wc_smart_cod_fee', 'change_cod_price' );
function change_cod_price( $price ) {
if( is_numeric( $price ) && intval( $price ) === 0 ) {
return $price;
}
return $price < 3 ? 3 : $price;
}
old removed.
unfortunately, for amounts less than 3 euro it does not set 3 euro again.
Please send me a screenshot of your plugin settings
Hi again! I just checked with a similar configuration and it works as it should.
Please make sure you copy pasted the above block code correctly, you don’t left anything from the previous block codes I sent you, and that you don’t use any other plugin to manipulate COD.
If the problem still persists you could try that:
add_filter( 'wc_smart_cod_fee', 'change_cod_price' );
function change_cod_price( $price ) {
if( $price === '0' ) {
return $price;
}
return $price < 3 ? 3 : $price;
}
But as I told you before, the previous snippet works just fine (sets the 3e minimum) in the same scenario as per your screenshot.
Dear Vetsos,
I confirm that it now works perfectly!
thank you very much
Nicola
Hi Nicola, happy to be of a help!
Send some of your fine tasting oil when you can! 🙂
Best Regards