PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.19
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.19
1.10.20 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 All 164 releases
← All changes | includes/Templates/Login.php +3 -0 1.10.2 → 1.10.19 View file →
@@ -8,8 +8,9 @@
8 8
9 9 namespace WCPOS\WooCommercePOS\Templates;
10 10
11 11 use WCPOS\WooCommercePOS\Services\Auth;
12 +use WCPOS\WooCommercePOS\Services\Cashier;
12 13 use WP_User;
13 14
14 15 /**
15 16 * Login template
@@ -43,8 +44,10 @@
43 44 if ( is_wp_error( $user ) ) {
44 45 foreach ( $user->errors as $error ) {
45 46 $error_string .= '<p class="error">' . $error[0] . '</p>';
46 47 }
48 + } elseif ( ! Cashier::instance()->can_open_pos( $user ) ) {
49 + $error_string .= '<p class="error">' . esc_html( Cashier::instance()->missing_pos_capabilities_message( $user ) ) . '</p>';
47 50 } else {
48 51 wp_set_current_user( $user->ID );
49 52 $this->login_success( $user );
50 53 exit;