How to Limit Image Upload Size on Your...
Preserve MyListing website performance and disk storage by limiting image upload size...

WPCodeBox
306

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;
}


Move WPCodeBox menu to the top bar for easy access in WordPress.



