diff --git a/includes/Api/OrdersController.php b/includes/Api/OrdersController.php index 437ab98..9df31bf 100644 --- a/includes/Api/OrdersController.php +++ b/includes/Api/OrdersController.php @@ -2216,20 +2216,8 @@ class OrdersController { } // Private meta (starts with _) - check if allowed - $allowed_private = apply_filters( 'woonoow/order_allowed_private_meta', [ - // Common shipping tracking fields - '_tracking_number', - '_tracking_provider', - '_tracking_url', - '_shipment_tracking_items', - '_wc_shipment_tracking_items', - - // Payment gateway meta - '_transaction_id', - '_payment_method_title', - - // Allow plugins to add their meta via filter - ], $order ); + // Core has ZERO defaults - plugins register via filter + $allowed_private = apply_filters( 'woonoow/order_allowed_private_meta', [], $order ); if ( in_array( $key, $allowed_private, true ) ) { $meta_data[ $key ] = $value; @@ -2247,14 +2235,8 @@ class OrdersController { */ private static function update_order_meta_data( $order, $meta_updates ) { // Get allowed updatable meta keys - $allowed = apply_filters( 'woonoow/order_updatable_meta', [ - // Common shipping tracking fields - '_tracking_number', - '_tracking_provider', - '_tracking_url', - - // Allow plugins to add their meta via filter - ], $order ); + // Core has ZERO defaults - plugins register via filter + $allowed = apply_filters( 'woonoow/order_updatable_meta', [], $order ); foreach ( $meta_updates as $key => $value ) { // Skip internal WooCommerce meta diff --git a/includes/Api/ProductsController.php b/includes/Api/ProductsController.php index 86b80ee..6c15f5d 100644 --- a/includes/Api/ProductsController.php +++ b/includes/Api/ProductsController.php @@ -743,12 +743,8 @@ class ProductsController { } // Private meta (starts with _) - check if allowed - $allowed_private = apply_filters('woonoow/product_allowed_private_meta', [ - // Common custom fields - '_custom_field', - - // Allow plugins to add their meta via filter - ], $product); + // Core has ZERO defaults - plugins register via filter + $allowed_private = apply_filters('woonoow/product_allowed_private_meta', [], $product); if (in_array($key, $allowed_private, true)) { $meta_data[$key] = $value; @@ -766,12 +762,8 @@ class ProductsController { */ private static function update_product_meta_data($product, $meta_updates) { // Get allowed updatable meta keys - $allowed = apply_filters('woonoow/product_updatable_meta', [ - // Common custom fields - '_custom_field', - - // Allow plugins to add their meta via filter - ], $product); + // Core has ZERO defaults - plugins register via filter + $allowed = apply_filters('woonoow/product_updatable_meta', [], $product); foreach ($meta_updates as $key => $value) { // Skip internal WooCommerce meta