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
@@ -10,7 +10,7 @@ defined('ABSPATH') || exit;
|
||||
trait ShippingPart1 {
|
||||
|
||||
private function send_shipping_notification(string $order_number, string $carrier, string $tracking_no, string $note = ''): void {
|
||||
if (!class_exists('OrderRepository')) {
|
||||
if (!class_exists('AKSRT\\Payment\\OrderRepository')) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ trait ShippingPart1 {
|
||||
}
|
||||
|
||||
private function sync_order_status(string $order_number, string $shipping_status, string $note = ''): void {
|
||||
if ($order_number === '' || !class_exists('OrderRepository') || !class_exists('Order')) {
|
||||
if ($order_number === '' || !class_exists('AKSRT\\Payment\\OrderRepository') || !class_exists('AKSRT\\Payment\\Order')) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user