docs: add comprehensive audit report and architectural recommendation

Checkpoint before implementation. Includes audit findings (FINDINGS.md),
architectural recommendation (RECOMMENDATION.md), and existing code changes
to Form, Order, Render, and form-action.js from recent development.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
dwindown
2026-04-17 17:00:47 +07:00
parent 0446eb1064
commit 35569923a5
6 changed files with 1014 additions and 153 deletions

View File

@@ -851,11 +851,46 @@ class Form {
'group' => 'started',
'description' => __( 'Add static product or custom item to form as default and non-editable item in order items.', 'formipay' )
],
'static_products' => [
'type' => 'autocomplete',
'post_type' => ['formipay-product'],
'label' => __( 'Assign Product', 'formipay' ),
'description' => __( 'Selected products will be added to the order items automatically, even if it is not added to cart.', 'formipay' )
// 'static_products' => [
// 'type' => 'autocomplete',
// 'post_type' => ['formipay-product'],
// 'label' => __( 'Assign Product', 'formipay' ),
// 'description' => __( 'Selected products will be added to the order items automatically, even if it is not added to cart.', 'formipay' )
// ],
'static_product' => [
'type' => 'repeater',
'label' => __( 'Static Product', 'formipay' ),
'description' => __( 'Selected products will be added to the order items automatically, even if it is not added to cart.', 'formipay' ),
'fields' => [
'default_qty' => [
'type' => 'number',
'label' => __( 'Default Qty', 'formipay' ),
'description' => __( 'Set default quantity', 'formipay' )
],
'editable_qty' => [
'type' => 'checkbox',
'label' => __( 'Editable Qty', 'formipay' ),
'description' => __( 'User can set quantity as they want', 'formipay' )
],
'minimum_qty' => [
'type' => 'number',
'label' => __( 'Minimum Qty', 'formipay' ),
'description' => __( 'Restrict buyer to set below this number', 'formipay' ),
'dependency' => [
'key' => 'editable_qty',
'value' => 'not_empty'
]
],
'maximum_qty' => [
'type' => 'number',
'label' => __( 'Minimum Qty', 'formipay' ),
'description' => __( 'Restrict buyer to set below this number', 'formipay' ),
'dependency' => [
'key' => 'editable_qty',
'value' => 'not_empty'
]
],
]
],
'static_items' => [
'type' => 'repeater',