How to Disable REST API Access for Gue...
Learn how to disable the REST API in your WordPress site for logged-out users and bui...

WPCodeBox
464

Learn how to set the default user registration role in WooCommerce by adjusting line 5 of the provided code snippet, replacing ‘subscriber’ with your desired role.
// 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;
}





