# Formipay — Implementation Task List **Last Updated:** April 17, 2026 **Reference:** PRD.md, FINDINGS.md, RECOMMENDATION.md --- ## Phase 1 — Critical Fixes & Stabilization ### Week 1: Critical Bug Fixes - [ ] **F1.1** Fix `Customer::update()` fatal error — define `$table_name` and fix `$new_args` reference - `includes/Customer.php` ~line 172 - [ ] **F1.2** Fix `Order::delete()` — change `$id` to `$order_id` in `$wpdb->delete()` where clause - `includes/Order.php` - [ ] **F1.3** Fix `Order::formipay_bulk_delete_order()` — use loop variable `$id` instead of outer `$order_id` - `includes/Order.php` - [ ] **F1.4** Fix `Email::send_email()` — change `\Formipay_Notification::` to `parent::` - `includes/Notification/Email.php` - [ ] **F1.5** Fix `Paypal::auto_cancel_order_on_timeout()` — add `use Formipay\Order as Order` import - `includes/Integration/Paypal.php` - [ ] **F1.6** Fix `Paypal::paypal_settings` — declare property or load from config - `includes/Integration/Paypal.php` - [ ] **F1.7** Fix `BankTransfer::add_unique_code_details()` — call `check_unique_code()` once, reuse result - `includes/Payment/BankTransfer.php` - [ ] **F1.8** Fix color field label "Number" → "Color" - `admin/functions.php` `formipay_field_type_collection()` - [ ] **F1.9** Add `check_ajax_referer` nonce check to `Customer::formipay_tabledata_customers()` - `includes/Customer.php` ### Week 2: Performance & Security - [ ] **F1.10** Replace `maybe_serialize()` in cookie handling with `json_encode()`/`json_decode()` - `includes/Order.php` `retrieve_form_data()` - [ ] **F1.11** Move `flush_rewrite_rules()` from `init` to activation hook - `includes/Thankyou.php` `set_endpoint()` - `includes/Payment/Payment.php` `set_endpoint()` - `formipay.php` (add register_activation_hook) - [ ] **F1.12** Add PayPal webhook signature verification - `includes/Integration/Paypal.php` `webhook_endpoint()` - [ ] **F1.13** Cache JSON file reads in static variables - `admin/functions.php` `formipay_currency_array()` - `admin/functions.php` `formipay_country_array()` - [ ] **F1.14** Add server-side pagination to `Customer::formipay_tabledata_customers()` - `includes/Customer.php` - [ ] **F1.15** Optimize `Order::formipay_tabledata_orders()` — replace two queries with `COUNT(*) GROUP BY status` - `includes/Order.php` - [ ] **F1.16** Delete backup file `includes/Integration/Paypal.phpbak` - [ ] **F1.17** Create `uninstall.php` — clean up options, custom tables, scheduled events - `uninstall.php` (new file) - [ ] **F1.18** Add capability checks (`current_user_can('manage_options')`) to admin-ajax handlers - [ ] **F1.19** Fix timezone hardcode — replace `'Asia/Jakarta'` with `wp_timezone_string()` - `includes/Render.php` --- ## Phase 2 — React Admin Foundation ### Week 3: Build Pipeline - [ ] **F2.1** Initialize `package.json` with `@wordpress/scripts` - [ ] **F2.2** Create `webpack.config.js` extending wp-scripts - [ ] **F2.3** Set up `src/admin/` directory structure - [ ] **F2.4** Create API client (`src/admin/api/client.js`) with nonce handling - [ ] **F2.5** Create admin page shell component (sidebar + routing) - [ ] **F2.6** Register admin menu pages in PHP that render React mount points ### Week 4: Form Builder - [ ] **F2.7** Build field palette component (drag-and-drop source) - [ ] **F2.8** Build form canvas component (drop target) - [ ] **F2.9** Build field settings panel - [ ] **F2.10** Build live preview renderer - [ ] **F2.11** Connect to existing PHP save/load endpoints - [ ] **F2.12** Replace Vue/Classic Editor metabox with React form builder ### Week 5: Order Management & Dashboard - [ ] **F2.13** Build order list page with filters (status, date, search) - [ ] **F2.14** Build order detail view (replace Handlebars templates) - [ ] **F2.15** Build status change workflow with timeline - [ ] **F2.16** Build analytics dashboard (order count, revenue, charts) - [ ] **F2.17** Build notification log viewer ### Week 6: Settings & Editors - [ ] **F2.18** Build global settings page (replace WPCFTO) - [ ] **F2.19** Build product editor page - [ ] **F2.20** Build coupon editor page - [ ] **F2.21** Build access items manager - [ ] **F2.22** Build license management page - [ ] **F2.23** Remove/deprecate Vue admin code --- ## Phase 3 — Frontend Enhancements ### Week 7-8: React Island Architecture - [ ] **F3.1** Add "Render Mode" setting to form admin (SSR / React) - [ ] **F3.2** Update `Render.php` — output `