Skip to content

[GOOWOO-453] Fix meta-boxes JS only on WC Edit Order screen#3291

Merged
ankitguptaindia merged 2 commits intofeature/in-product-placementsfrom
fix/GOOWOO-453-load-meta-boxes-js-on-the-wc-edit-order-page-only
Mar 13, 2026
Merged

[GOOWOO-453] Fix meta-boxes JS only on WC Edit Order screen#3291
ankitguptaindia merged 2 commits intofeature/in-product-placementsfrom
fix/GOOWOO-453-load-meta-boxes-js-on-the-wc-edit-order-page-only

Conversation

@jamesmorrison
Copy link
Collaborator

Changes proposed in this Pull Request:

Closes https://linear.app/a8c/issue/GOOWOO-453/load-meta-boxes-js-asset-in-the-wc-edit-order-page-only

Screenshots:

Screenshot 2026-03-10 at 14 27 02

Detailed test instructions:

  1. Open WP admin, navigate to WooCommerce -> Settings -> Advanced -> Features
  2. Confirm / set "Order data storage" is "High-performance order storage"
  3. Navigate to WooCommerce -> Home
  4. Open the inspector, confirm you do NOT see "Google for WooCommerce: meta-boxes script loaded"
  5. Navigate to WooCommerce -> Orders and select an order (create one if need be)
  6. Open the inspector, confirm you DO see "Google for WooCommerce: meta-boxes script loaded"
  7. Navigate to WooCommerce -> Settings -> Advanced -> Features
  8. Set "Order data storage" to "WordPress posts storage"
  9. Navigate to WooCommerce -> Home
  10. Open the inspector, confirm you do NOT see "Google for WooCommerce: meta-boxes script loaded"
  11. Navigate to WooCommerce -> Orders and select an order (create one if need be)
  12. Open the inspector, confirm you DO see "Google for WooCommerce: meta-boxes script loaded"

Additional details:

Add - Added new JS file for meta boxes; conditionally enqueued on the edit order page.

@github-actions github-actions bot added type: bug The issue is a confirmed bug. changelog: fix Took care of something that wasn't working. labels Mar 10, 2026
@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.7%. Comparing base (6ffb44b) to head (4d403ae).
⚠️ Report is 4 commits behind head on feature/in-product-placements.

Files with missing lines Patch % Lines
src/Admin/Admin.php 0.0% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                        Coverage Diff                        @@
##             feature/in-product-placements   #3291     +/-   ##
=================================================================
- Coverage                             66.7%   66.7%   -0.0%     
- Complexity                            5192    5193      +1     
=================================================================
  Files                                  888     888             
  Lines                                26803   26804      +1     
  Branches                              1562    1562             
=================================================================
  Hits                                 17875   17875             
- Misses                                8728    8729      +1     
  Partials                               200     200             
Flag Coverage Δ
js-unit-tests 66.3% <ø> (ø)
php-unit-tests 66.8% <0.0%> (-<0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/Admin/Admin.php 0.0% <0.0%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ankitguptaindia ankitguptaindia self-requested a review March 13, 2026 13:04
@ankitguptaindia ankitguptaindia merged commit 1b89045 into feature/in-product-placements Mar 13, 2026
16 checks passed
@ankitguptaindia ankitguptaindia deleted the fix/GOOWOO-453-load-meta-boxes-js-on-the-wc-edit-order-page-only branch March 13, 2026 13:07
@ankitguptaindia
Copy link
Collaborator

QA Status: Approved ✅

Environment

  • WordPress: 7.0-beta4-61946
  • PHP: 8.3.23
  • Server: nginx/1.26.1
  • Database: mysqli (Server: 8.0.35 / Client: mysqlnd 8.3.23)
  • Browser: Chrome 144.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.4
  • MU Plugins: None activated
  • Plugins:
    • Force GLA Billing Status to Approved 1.0
    • Google for WooCommerce 3.5.3
    • WooCommerce 10.6.1

Test result:

Tested the scenario with both High-Performance Order Storage (HPOS) and WordPress posts storage enabled.

Results confirm that the meta-boxes script (Google for WooCommerce: meta-boxes script loaded) loads only on the Order Edit screen, and does not load on other admin pages such as WooCommerce → Home.

This behaviour was consistent in both storage modes:

  • HPOS enabled
  • WordPress posts storage enabled

With WordPress posts storage table:

Recording.1738.mp4

High-performance order storage:

Recording.1739.mp4

@ankitguptaindia ankitguptaindia restored the fix/GOOWOO-453-load-meta-boxes-js-on-the-wc-edit-order-page-only branch March 13, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: fix Took care of something that wasn't working. type: bug The issue is a confirmed bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants