Alter the notification HTML or remove notifications completely.
Change the final HTML output
/**
* Filter the notification HTML output.
*
* @param string $notiifcation Notification HTML partial
*/
function my_prefix_alter_notification( $notification ) {
$notification = str_replace( 'cpops-notification', 'custom-class', $notification );
retyurn $notification;
}
add_filter( 'cartpops_drawer_notice_html', 'my_prefix_alter_notification', 10, 1 )
Remove all notifications
/**
* Remove all CartPops notifications
*
* @param string $notiifcation Notification HTML partial
*/
function my_prefix_remove_all_notifications( $notification ) {
return '';
}
add_filter( 'cartpops_drawer_notice_html', 'my_prefix_remove_all_notifications', 10, 1 )