Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woogists/61892edae19d810baa44435e42d432ab to your computer and use it in GitHub Desktop.
Save woogists/61892edae19d810baa44435e42d432ab to your computer and use it in GitHub Desktop.
[WooCommerce Order Barcodes] Fixes No Sufficient Permission To Scan Barcodes Error
/*
* Snippet to fix No Sufficient Permission To Scan Barcodes Error.
* Code goes in the functions.php file in your theme.
*/
add_filter( 'woocommerce_order_barcodes_scan_permission', 'modify_woocommerce_order_barcodes_scan_permission' );
function modify_woocommerce_order_barcodes_scan_permission( $has_permission ) {
// Do any required permission checks here
$has_permission = true;
return $has_permission;
}
@MNH1234
Copy link

MNH1234 commented May 14, 2021

If I wanted to only allow those with 'contributor' status, how would I include that on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment