• Resolved beauchicmy

    (@beauchicmy)


    Hi,
    i have try out the new feature, add credit for new user registration, i like it very much, but i have encounter the below issued:
    after setting the auto credit for new user registration, but i notice when a new Vendor signup, new vendor received credit. BUT when a new customer signup, customer never received credit.
    is there a way i can assign this to only Customer?

    Please advise with thanks.

    The page I need help with: [log in to see the link]

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

    (@subratamal)

    @beauchicmy,

    We have checked in our local environment about this through WooCommerce registration page also WordPress registration page and it’s working as expected. There might be any plugin or theme conflict, We advise you to deactivate all other plugins except WooCommerce and WooWallet and check.

    Regarding restricting new user credit except for customer please use below code to theme function.php file.

    add_filter('woo_wallet_new_user_registration_credit', 'woo_wallet_new_user_registration_credit_callback',10, 2);
    
    function woo_wallet_new_user_registration_credit_callback($is_enable, $user_id){
        $user = new WP_User($user_id);
        if(in_array('customer', $user->roles)){
            return true;
        }
        return false;
    }
    Thread Starter beauchicmy

    (@beauchicmy)

    thank you. the code resolved all my problem.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Action > New User Reg: Credit not apply to Customer’ is closed to new replies.