fix: React admin icon imports and mount point rendering
- Fix all @wordpress/icons imports - use build/ paths and call as functions - Update all admin pages to render React mount points - Components fixed: VariationPricingTable, NotificationLog, GlobalSettings, FormFieldOptions, OrderDetail, OrderListItem, OrderList, FormCanvas, AnalyticsDashboard, FormField, Products - Admin pages updated: Order.php, Customer.php, Coupon.php, License.php, Product.php, Access.php, Form.php Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -84,7 +84,7 @@ class Access {
|
||||
}
|
||||
|
||||
public function formipay_access_items() {
|
||||
include_once FORMIPAY_PATH . 'admin/page-access-items.php';
|
||||
\Formipay\Admin\ReactAdmin::render_mount_point('access');
|
||||
}
|
||||
|
||||
public function enqueue_admin() {
|
||||
|
||||
@@ -94,7 +94,7 @@ class Coupon {
|
||||
}
|
||||
|
||||
public function formipay_coupon() {
|
||||
include_once FORMIPAY_PATH . 'admin/page-coupons.php';
|
||||
\Formipay\Admin\ReactAdmin::render_mount_point('coupons');
|
||||
}
|
||||
|
||||
public function enqueue_admin() {
|
||||
|
||||
@@ -219,14 +219,7 @@ class Customer {
|
||||
}
|
||||
|
||||
public function customers_page() {
|
||||
|
||||
$customer_id = intval(filter_input(INPUT_GET, 'customer_id', FILTER_SANITIZE_STRING));
|
||||
if(empty($customer_id)){
|
||||
include FORMIPAY_PATH . 'admin/page-customers.php';
|
||||
}else{
|
||||
include FORMIPAY_PATH . 'admin/page-customer-details.php';
|
||||
}
|
||||
|
||||
\Formipay\Admin\ReactAdmin::render_mount_point('customers');
|
||||
}
|
||||
|
||||
public function formipay_tabledata_customers() {
|
||||
|
||||
@@ -93,7 +93,7 @@ class Form {
|
||||
}
|
||||
|
||||
public function formipay_form() {
|
||||
include_once FORMIPAY_PATH . 'admin/page-forms.php';
|
||||
\Formipay\Admin\ReactAdmin::render_mount_point('forms');
|
||||
}
|
||||
|
||||
public function metaboxes($post) {
|
||||
|
||||
@@ -70,7 +70,7 @@ class License {
|
||||
}
|
||||
|
||||
public function page_licenses() {
|
||||
include FORMIPAY_PATH . 'admin/page-licenses.php';
|
||||
\Formipay\Admin\ReactAdmin::render_mount_point('licenses');
|
||||
}
|
||||
|
||||
/** Enqueue admin assets for Licenses page */
|
||||
|
||||
@@ -642,12 +642,13 @@ class Order {
|
||||
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
$order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0;
|
||||
if(empty($order_id)){
|
||||
include FORMIPAY_PATH . 'admin/page-orders.php';
|
||||
}else{
|
||||
$order = formipay_get_order( $order_id );
|
||||
include FORMIPAY_PATH . 'admin/page-order-details.php';
|
||||
}
|
||||
$page = $order_id ? 'order-detail' : 'orders';
|
||||
|
||||
// Render React mount point
|
||||
printf(
|
||||
'<div id="formipay-admin-root" data-formipay-mount="%s"></div>',
|
||||
esc_attr($page)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ class Product {
|
||||
}
|
||||
|
||||
public function formipay_products() {
|
||||
include_once FORMIPAY_PATH . 'admin/page-products.php';
|
||||
\Formipay\Admin\ReactAdmin::render_mount_point('products');
|
||||
}
|
||||
|
||||
public function cpt_post_fields_box($boxes) {
|
||||
|
||||
Reference in New Issue
Block a user