Created
July 5, 2018 17:09
-
-
Save bernattorras/681aa179be2cbeb4c9a2cfe5e5648eca to your computer and use it in GitHub Desktop.
Function to disable the "Choose a new subscription" message when switching a subscription item
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Function to disable the "Choose a new subscription" message when switching a subscription item | |
**/ | |
add_filter('woocommerce_add_notice', 'disable_switch_notice', 10, 1); | |
function disable_switch_notice( $message){ | |
if($message=="Choose a new subscription."){ | |
$message = ''; | |
} | |
return $message; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment