• Resolved N.g

    (@loralora)


    Hello

    Can you please tell me the php code to disable notifications from your plugin? I’m having trouble displaying “Coupon Applied” and “Congratulations, You’ve Got a Free Gift” notifications

    and in general – I realized that I do not need these notifications

    Thank you for the plugin and support

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WebToffee

    (@webtoffee)

    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;
    }
    Thread Starter N.g

    (@loralora)

    Thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘disable notifications from your plugin’ is closed to new replies.