I'm looking to redirect a specific category of users (wholesale_customer) to the appropriate page (wholesale_ordering_page) while sending all other user categories and anonymous to the standard shop page.
Should be a statement which checks if wholesale customer, forward to wholesale_ordering.
Here is the code that I have been working with.
<?php
get_footer( 'shop' );
$user_info = get_userdata(1);
if ( in_array('wholesale-user', $user_info->roles, true )){ }
wp_redirect('https://myregeneration.life/wholesale-ordering/'); exit; }
?>