PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.18
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.18
1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 All 163 releases
← All changes | includes/Templates/Auth.php +3 -2 1.10.81.10.18 View file →
@@ -18,8 +18,9 @@
18 18 namespace WCPOS\WooCommercePOS\Templates;
19 19
20 20 use WCPOS\WooCommercePOS\Logger;
21 21 use WCPOS\WooCommercePOS\Services\Auth as AuthService;
22 +use WCPOS\WooCommercePOS\Services\Cashier;
22 23 use WP_Error;
23 24 use WP_User;
24 25
25 26 /**
@@ -316,11 +317,11 @@
316 317 return;
317 318 }
318 319
319 320 // Check if user has access to POS.
320 - if ( ! user_can( $user, 'access_woocommerce_pos' ) ) {
321 + if ( ! Cashier::instance()->can_open_pos( $user ) ) {
321 322 $this->log_auth_attempt( $username, 'no_permission' );
322 - $this->error = __( 'You do not have permission to access the POS.', 'woocommerce-pos' );
323 + $this->error = Cashier::instance()->missing_pos_capabilities_message( $user );
323 324
324 325 return;
325 326 }
326 327