How can I restrict registered user’s cart from being captured?
Hook
wcal_restrict_user
/** * Add this code snippet in the "functions.php" file of your currently active theme. */ add_filter( 'wcal_restrict_user', 'restrict_admin_carts', 10, 2 ); function restrict_admin_carts( $restrict, $user_id ) { $user_meta = get_userdata( $user_id ); $user_roles = $user_meta->roles; if( in_array( 'administrator', $user_roles ) ) { $restrict = true; } return $restrict; }