feat: temp password in emails + WC page redirects to SPA

1. Temp password for auto-registered users:
   - Store password in _woonoow_temp_password user meta (CheckoutController)
   - Add {user_temp_password} and {login_url} variables (EmailRenderer)
   - Update new_customer email template to show credentials

2. WC page redirects to SPA routes:
   - Added redirect_wc_pages_to_spa() in TemplateOverride
   - Maps: /shop → /store/#/, /cart → /store/#/cart, etc.
   - /checkout → /store/#/checkout, /my-account → /store/#/account
   - Single products → /store/#/products/{slug}

3. Removed shortcode system:
   - Commented out Shortcodes::init() in Bootstrap
   - WC pages now redirect to SPA instead
This commit is contained in:
Dwindi Ramadhana
2026-01-01 16:45:24 +07:00
parent 38a7a4ee23
commit 58681e272e
5 changed files with 78 additions and 19 deletions

View File

@@ -296,6 +296,10 @@ class CheckoutController {
// Link order to new user
$order->set_customer_id($new_user_id);
// Store temp password in user meta for email template
// The real password is already set via wp_insert_user
update_user_meta($new_user_id, '_woonoow_temp_password', $password);
// Set WooCommerce customer billing data
$customer = new \WC_Customer($new_user_id);