feat: remove shop feature (Phase 2)
Delete all shop domain classes, controllers, schema builders, templates, JS/CSS, admin SPA pages, and shop-only payment classes (Shipping, AfterSale, Discount). Remove shop-only DB table definitions (product_variant, after_sale, order_shipping, card_key) from migrator and add their DROP to uninstall.php. Clean up shared files: - Remove aksrt_product CPT + taxonomies from Setup.php - Remove shop rewrite rules/query vars/template redirect from SetupPart2.php - Remove shop widget areas from SetupPart1.php - Remove shop enqueues from ScriptsPart1b.php - Remove sepakerator-aksrt-shop from SetupPart2.php - Remove get_shop_settings facade (delete ForumShop.php, clean DomainGroups.php) - Remove ORDER_PRODUCT_SHOP constant from DomainModel.php - Remove Shop::class fallback branches from UserOrders.php, OrderCenterRest.php - Remove shipping/after-sale branches from OrderRepositoryAdmin.php, PayMenus.php, PayOrders.php - Remove shop product widgets from widgets-register.php - Remove cart page from template-registry.php, routing.php, ScriptsPart2.php - Remove cart UI from sidebar-nav.php, profile-orders.php, sidebar-orders.php - Clean up order-center.js (remove rebuy/cartUrl/receipt/after-sale handlers) - Remove aksrt_get_cart_page_url/product_page/product_edit from transactions.php - Clean up aksrt_product_cat references in Coupon.php, PayCoupons.php Shared payment/order/credits/content-pay stack fully retained.
This commit is contained in:
1 parent
2bbd7c01a3
commit
1d2505356e
103 files changed
+46
-21267
No files matched your search
@@ -17,41 +17,6 @@ function aksrt_get_order_status_labels(): array {
|
||||
return [];
|
||||
}
|
||||
|
||||
function aksrt_get_product_page_view(int $product_id): array {
|
||||
if ($product_id <= 0 || !class_exists('\AKSRT\Shop\Shop')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return \AKSRT\Shop\Shop::get_instance()->get_product_detail_view($product_id);
|
||||
}
|
||||
|
||||
function aksrt_get_product_edit_page_view(int $user_id, int $product_id = 0): array {
|
||||
if ($user_id <= 0 || !class_exists('\AKSRT\Shop\Shop')) {
|
||||
return [
|
||||
'allowed' => false,
|
||||
'is_edit' => false,
|
||||
'product' => [],
|
||||
];
|
||||
}
|
||||
|
||||
return \AKSRT\Shop\Shop::get_instance()->get_product_edit_view($user_id, $product_id);
|
||||
}
|
||||
|
||||
function aksrt_get_cart_page_view(int $user_id): array {
|
||||
if ($user_id <= 0 || !class_exists('\AKSRT\Shop\Shop')) {
|
||||
return [
|
||||
'payment_methods' => [],
|
||||
'shipping_methods' => [],
|
||||
'address_book' => [],
|
||||
'coupon_enabled' => false,
|
||||
'currency_symbol' => '¥',
|
||||
'pending_orders' => [],
|
||||
];
|
||||
}
|
||||
|
||||
return \AKSRT\Shop\Shop::get_instance()->get_cart_page_view($user_id);
|
||||
}
|
||||
|
||||
function aksrt_get_orders_page_view(int $user_id, int $paged = 1, int $per_page = 20, string $status = '', string $product_type = ''): array {
|
||||
$empty = [
|
||||
'items' => [],
|
||||
@@ -79,10 +44,6 @@ function aksrt_get_orders_page_view(int $user_id, int $paged = 1, int $per_page
|
||||
return \AKSRT\Payment\UserOrders::get_instance()->get_order_center_view($user_id, $args);
|
||||
}
|
||||
|
||||
if (class_exists('\AKSRT\Shop\Shop')) {
|
||||
return \AKSRT\Shop\Shop::get_instance()->get_order_center_view($user_id, $args);
|
||||
}
|
||||
|
||||
return $empty;
|
||||
}
|
||||
|
||||
@@ -135,4 +96,4 @@ function aksrt_get_revenue_page_view(int $user_id): array {
|
||||
'total_withdrawn' => $total_withdrawn,
|
||||
'records' => $records,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user