Last active
March 5, 2017 20:56
-
-
Save Abd-Ur-Rehman/d6fa2b8edc83859fa8bdf4b53cac2c30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // adding a new role // | |
| add_role( 'pending', __('Pending' ),array( | |
| 'read' => true, | |
| ) | |
| ); | |
| // Assigning a new role // | |
| add_filter('woocommerce_new_customer_data', 'abdurrehman_net_custom_role', 10, 1); | |
| function abdurrehman_net_custom_role($args) { | |
| $args['role'] = 'pending'; | |
| return $args; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment