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:
kate522 committed 2026-07-17 15:40:20 +08:00
1 parent d55d1c6b62
commit 68d2e78d77
40 files changed
+105 -105

No files matched your search

+1 -1
View File
@@ -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';