cartpops_drawer_notice_html

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 )

It's time to improve your WooCommerce Cart

CartPops is a WooCommerce Add To Cart Popup, that helps every shop owner improve their user experience, increase conversions & maximize profits.

Was this page helpful?