Hi @loralora,
Thanks for reaching out to us. You may copy the below code snippet and paste it into your child theme’s function.php file. (WordPress Dashboard > Appearance > Theme Editor > functions.php)
To hide the “Coupon Applied” message:
add_filter('woocommerce_coupon_message', 'wt_sc_alter_coupon_applied_message', 10000, 3);
function wt_sc_alter_coupon_applied_message($msg, $msg_code, $coupon)
{
$msg = ''; // empty the message to hide
return $msg;
}
To hide the “Congratulations, You’ve Got a Free Gift” message:
add_filter('wt_sc_alter_free_product_added_message', 'wt_sc_alter_free_product_added_message_fn', 10000, 3);
function wt_sc_alter_free_product_added_message_fn($message, $product, $coupon_code)
{
$message = ''; // empty the message to hide
return $message;
}