Replace the WordPress Dashboard News F...
Easily replace the default WordPress dashboard news feed with any custom RSS feed usi...

WPCodeBox
436
Learn how to set the default user registration role in WooCommerce with this simple code snippet. Perfect for managing new customer roles on your e-commerce site.
/**
* Author: WP Turned UP
* Author URI: https://wpturnedup.com
*/
//// In our example here, we are setting the default role to the 'Subscriber' role, and you can set your desired role
//// by editing the '$args['role'] = 'subscriber';' entry.
//// ----------------- CODE SNIPPET IS BELOW THIS LINE - REMOVE THIS LINE AND ABOVE -----------------
// Set Woocommerce Default User Registration Role
add_filter('woocommerce_new_customer_data', 'wc_assign_custom_role', 10, 1);
function wc_assign_custom_role($args) {
$args['role'] = 'subscriber';
return $args;
}


Check it a URL parameter exists in Oxygen Builder.



