Changing Woocommerce signup role

Home Forums Legacy Support Support queries How-to & Troubleshooting Changing Woocommerce signup role

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #209829
    futureyoon_208
    Participant
    Hi,   Currently WooCommerce default role is Customer. How do I set it to Student by default, instead of manually changing "Customer -> Student" at the backend?
    #210074
    logan
    Member
    Hello, Please paste this snippets in your wp-admin >> plugins >> editor >> wplms-customizer plugin >> wplms-customizer.php  Or in Please add this code in your wplms-customizer.php file in wplms customizer plugin by using your FTP/SFTP/cpanel: /**
    • Replace 'customer' role (WooCommerce use by default) with your own one.
    **/ add_filter('woocommerce_new_customer_data', 'logan_assign_custom_role', 10, 1);   function logan_assign_custom_role($args) { $args['role'] = 'student';   return $args; }
    #210341
    futureyoon_208
    Participant
    it worked perfectly, thank you Logan! you may close this topic :)
    #210448
    logan
    Member

    Dear Friend,

    Glad you’re an issue is resolved.  🙂

    You could share your review about us. I would really appreciate that! Here: https://themeforest.net/item/wplms-learning-management-system/reviews/6780226

    If I can be of assistance, please do not hesitate to contact me again.

    Closing this topic.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Changing Woocommerce signup role’ is closed to new replies.