Skip to content

Instantly share code, notes, and snippets.

@rajeshsingh520
Created June 11, 2025 00:50
Show Gist options
  • Save rajeshsingh520/ac3ec52187aa11e0e5ef61beba9a9c2e to your computer and use it in GitHub Desktop.
Save rajeshsingh520/ac3ec52187aa11e0e5ef61beba9a9c2e to your computer and use it in GitHub Desktop.
Disable order limit by user role
add_filter('pisol_disable_order_limit_check', function($disable){
if (is_user_logged_in()) {
$user = wp_get_current_user();
if (in_array('administrator', $user->roles) || in_array('shop_manager', $user->roles)) {
$disable = true;
}
}
return $disable;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment