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:
2026-08-02 21:25:52 +08:00
parent 2bbd7c01a3
commit 1d2505356e
103 changed files with 46 additions and 21267 deletions
+1 -35
View File
@@ -111,7 +111,7 @@ add_filter('query_vars', function ($vars) {
// 主题切换离开时:清理本主题注册的 cron 任务
add_action('switch_theme', function () {
$hooks = ['aksrt_dl_token_cleanup', 'aksrt_email_verification_backfill_batch', 'aksrt_notification_cleanup', 'aksrt_reconcile_refunds', 'aksrt_after_sale_auto_cancel'];
$hooks = ['aksrt_dl_token_cleanup', 'aksrt_email_verification_backfill_batch', 'aksrt_notification_cleanup'];
foreach ($hooks as $hook) {
$next = wp_next_scheduled($hook);
while ($next) {
@@ -318,10 +318,6 @@ if (class_exists('\AKSRT\Payment\Order')) {
\AKSRT\Payment\Order::get_instance()->init();
}
if (class_exists('\AKSRT\Payment\AfterSale')) {
\AKSRT\Payment\AfterSale::get_instance()->init();
}
// Register built-in payment gateways
if (class_exists('\AKSRT\Payment\Gateway')) {
$gw = \AKSRT\Payment\Gateway::get_instance();
@@ -358,30 +354,6 @@ if (class_exists('\AKSRT\Core\TermMeta')) {
\AKSRT\Core\TermMeta::get_instance()->init();
}
// 商城 taxonomy term meta + shop_discount 优惠活动
if (class_exists('\AKSRT\Shop\TermMeta')) {
\AKSRT\Shop\TermMeta::get_instance()->init();
}
// 商品后台列表自定义列(销量/综合数据/商家/优惠活动)
if (is_admin() && class_exists('\AKSRT\Admin\ShopController')) {
\AKSRT\Admin\ShopController::get_instance()->init_product_admin_columns();
}
// 商品原生编辑 meta box(价格/库存/发货售后)
if (is_admin() && class_exists('\AKSRT\Shop\ProductMetaBox')) {
\AKSRT\Shop\ProductMetaBox::get_instance()->init();
}
// 商品原生变体 meta box
if (is_admin() && class_exists('\AKSRT\Shop\ProductVariantsMetaBox')) {
\AKSRT\Shop\ProductVariantsMetaBox::get_instance()->init();
}
// 商品评价/评分系统
if (class_exists('\AKSRT\Shop\ProductReview')) {
\AKSRT\Shop\ProductReview::get_instance()->init();
}
// 文章局部配置 meta box(仅后台)
if (is_admin() && class_exists('\AKSRT\Core\PostMetaBox')) {
\AKSRT\Core\PostMetaBox::get_instance()->init();
@@ -434,12 +406,6 @@ if (is_admin() && class_exists('\AKSRT\Admin\Native\PayCoupons')) {
if (is_admin() && class_exists('\AKSRT\Admin\Native\PayChargeCards')) {
\AKSRT\Admin\Native\PayChargeCards::get_instance()->init();
}
if (is_admin() && class_exists('\AKSRT\Admin\Native\PayShipping')) {
\AKSRT\Admin\Native\PayShipping::get_instance()->init();
}
if (is_admin() && class_exists('\AKSRT\Admin\Native\PayAfterSale')) {
\AKSRT\Admin\Native\PayAfterSale::get_instance()->init();
}
if (is_admin() && class_exists('\AKSRT\Admin\Native\PayOrders')) {
\AKSRT\Admin\Native\PayOrders::get_instance()->init();
}