fix(ns): class_exists() must use FQCN after PSR-4
Bare class_exists('Balance') looks up global Balance, always false
under AKSRT\* namespaces → REST 403 on balance exchange and friends.
Rewrite string checks to AKSRT\{Domain}\{Class}.
This commit is contained in:
1 parent
d55d1c6b62
commit
68d2e78d77
40 files changed
+105
-105
No files matched your search
@@ -159,7 +159,7 @@ class CartService {
|
||||
$guest = get_post_meta($product_id, '_aksrt_guest_buy', true);
|
||||
if ($guest === '0' || $guest === '') {
|
||||
// Fall back to inheritance chain via TermMeta
|
||||
if (class_exists('TermMeta')) {
|
||||
if (class_exists('AKSRT\Shop\TermMeta')) {
|
||||
$resolved = TermMeta::resolve_inheritance($product_id, 'guest_buy');
|
||||
if (empty($resolved)) {
|
||||
return 'login_required';
|
||||
|
||||
Reference in new issue
Block a user