dimanche 15 novembre 2015

woocommerce subscriptions Change default cart notices When add more than 1 subscription products

I have added woocommerce subscriptions and this site has two types of products. Subcription products and simple products. When I add 2 subscription products to cart the following message appearing in checkout page and cart.

"A subscription has been removed from your cart. Due to payment gateway restrictions, different subscription products can not be purchased at the same time."

I need to edit this message and I have taken two approaches and didn't work. 1. Adding editted woocommerce-subscriptions.php file to child theme folder. 2. Add following lines to child-theme's functions.php

    add_filter( 'woocommerce_add_error', function( $message ) {
    if( $message == 'Some message' )
        $message = '';

    return $message;
});

Can anyone help me to edit this message? Thank you!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire