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/Frontend.php +18 -5 1.10.41.10.18 View file →
@@ -10,8 +10,9 @@
10 10
11 11 namespace WCPOS\WooCommercePOS\Templates;
12 12
13 13 use WCPOS\WooCommercePOS\Services\Auth;
14 +use WCPOS\WooCommercePOS\Services\Cashier;
14 15 use WCPOS\WooCommercePOS\Services\Lifecycle_Events;
15 16 use WCPOS\WooCommercePOS\Services\Settings;
16 17 use WCPOS\WooCommercePOS\Sync\Pos_Uuid;
17 18 use WCPOS\WooCommercePOS\Template_Router;
@@ -53,11 +54,11 @@
53 54 auth_redirect();
54 55 }
55 56
56 57 // check privileges.
57 - if ( ! current_user_can( 'access_woocommerce_pos' ) ) {
58 - // translators: Authorization error shown when a logged-in user lacks permission to open the POS page.
59 - wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'woocommerce-pos' ) );
58 + $user = wp_get_current_user();
59 + if ( ! Cashier::instance()->can_open_pos( $user ) ) {
60 + wp_die( esc_html( Cashier::instance()->missing_pos_capabilities_message( $user ) ), '', array( 'response' => 403 ) );
60 61 }
61 62
62 63 // disable cache plugins.
63 64 $this->no_cache();
@@ -154,8 +155,18 @@
154 155
155 156 // Default to the plugin's own major.minor so the stable lane tracks the
156 157 // version automatically: a 1.9.x plugin loads `@1.9`, a 1.10.x plugin loads
157 158 // `@1.10`, etc. — no edit needed as versions roll.
159 +
160 + /*
161 + * One jsDelivr ref per lane, named after the lane (owner ruling, 2026-09-04):
162 + * released lane → `@<major.minor>` (this default; the tag is cut at release)
163 + * next lane → `@next` — the `next` BRANCH of wcpos/web-bundle IS the dev
164 + * lane's tag. There is no versioned/prerelease tag for `next`.
165 + * dev-next sets WCPOS_WEB_BUNDLE_REF=next to load it.
166 + */
167 + // When `next` becomes `main`, the released ref simply becomes the new
168 + // major.minor (e.g. `@1.11`) via this default.
158 169 $default_bundle_ref = implode( '.', \array_slice( explode( '.', VERSION ), 0, 2 ) );
159 170
160 171 /**
161 172 * The web-bundle ref served from jsDelivr (or a full base URL).
@@ -161,10 +172,12 @@
161 172 * The web-bundle ref served from jsDelivr (or a full base URL).
162 173 *
163 174 * Override via the WCPOS_WEB_BUNDLE_REF constant / env var or this filter to
164 175 * point a site at another lane for testing the in-development build locally
165 - * or on staging: a branch (e.g. `next`), a tag, a commit, or a full base URL
166 - * (anything containing `://`, e.g. a local dev server or an EAS preview).
176 + * or on staging: the `next` lane's ref is the branch `next`
177 + * (https://cdn.jsdelivr.net/gh/wcpos/web-bundle@next); a tag, a commit, or a
178 + * full base URL (anything containing `://`, e.g. a local dev server or an EAS
179 + * preview) also work.
167 180 *
168 181 * @hook woocommerce_pos_web_bundle_ref
169 182 */
170 183 $bundle_ref = (string) apply_filters( 'woocommerce_pos_web_bundle_ref', $explicit_bundle_ref ?? $default_bundle_ref );