From 3a80f5fc7538c25d4c3880e8f87247c371468034 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 18 Jul 2026 14:12:30 +0800 Subject: [PATCH 1/2] fix(shop): delegate product checkout_hint to CheckoutService get_product_detail_view() still called Shop::get_checkout_hint() after the method moved into CheckoutService, which fatals on product detail pages. --- src/AKSRT/Shop/Shop.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AKSRT/Shop/Shop.php b/src/AKSRT/Shop/Shop.php index f29702d3..eb9cbd0a 100644 --- a/src/AKSRT/Shop/Shop.php +++ b/src/AKSRT/Shop/Shop.php @@ -113,7 +113,7 @@ class Shop { $detail['shipping'] = $this->product_service()->get_product_shipping_profile($product_id); $detail['after_sale'] = $this->product_service()->get_product_after_sale_profile($product_id); $detail['marketing'] = $this->product_service()->get_product_marketing_profile($product_id); - $detail['checkout_hint'] = $this->get_checkout_hint($detail); + $detail['checkout_hint'] = $this->checkout_service()->get_checkout_hint($detail); $detail['purchase_enabled'] = ($detail['is_unlimited'] || $detail['stock'] > 0) && $detail['status'] === 'publish'; $detail['default_quantity'] = 1; $detail['options'] = $this->get_product_options($product_id); From 02006945f20522f57d193aedfbe600b395580cea Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 18 Jul 2026 14:20:44 +0800 Subject: [PATCH 2/2] fix(shop): use get_address_book facade on cart/store views Call sites still invoked undefined Shop::get_user_address_book() after address logic moved to AddressService; route through the existing get_address_book() facade instead. --- src/AKSRT/Shop/Part1.php | 2 +- src/AKSRT/Shop/Shop.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AKSRT/Shop/Part1.php b/src/AKSRT/Shop/Part1.php index 7d77128c..969597de 100644 --- a/src/AKSRT/Shop/Part1.php +++ b/src/AKSRT/Shop/Part1.php @@ -208,7 +208,7 @@ trait Part1 { 'url' => get_author_posts_url($author_id), 'product_count' => $product_count, 'contact' => $contact, - 'addresses' => $this->get_user_address_book($author_id), + 'addresses' => $this->get_address_book($author_id), ]; } diff --git a/src/AKSRT/Shop/Shop.php b/src/AKSRT/Shop/Shop.php index eb9cbd0a..c0907c11 100644 --- a/src/AKSRT/Shop/Shop.php +++ b/src/AKSRT/Shop/Shop.php @@ -224,7 +224,7 @@ class Shop { return [ 'payment_methods' => $this->get_payment_method_options(), 'shipping_methods' => $this->get_shipping_method_options(), - 'address_book' => $this->get_user_address_book($user_id), + 'address_book' => $this->get_address_book($user_id), 'coupon_enabled' => class_exists('\AKSRT\Payment\Coupon'), 'currency_symbol' => '¥', 'pending_orders' => $pending_orders['items'] ?? [],