Skip to content

Conversation

@worais
Copy link

@worais worais commented Oct 30, 2025

All Submissions:

  • Does your code follow the Extendables standards?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?

Changes proposed in this Pull Request:

Adds support for displaying the Amazon Pay metabox on the Subscription edit screen when HPOS is enabled.

Previously, the metabox only appeared on classic order edit screens (shop_order).
When HPOS was activated, the screen ID for subscriptions changed (woocommerce_page_wc-orders--shop_subscription), causing the metabox not to render.

This PR:

  • Adds a new utility method WC_Amazon_Payments_Advanced_Utils::get_edit_subscription_screen_id().
  • Updates the admin class WC_Amazon_Payments_Advanced_Order_Admin to:
    • Register the metabox for both Orders and Subscriptions in classic and HPOS modes.
    • Handle non-AJAX order actions for subscriptions as well.

Closes woocommerce#296.


How to test the changes in this Pull Request:

  1. Activate WooCommerce Subscriptions and Amazon Pay.
  2. Enable HPOS in WooCommerce → Settings → Advanced → Features.
  3. Create a Subscription paid with Amazon Pay.
  4. Open the Subscription edit screen in the admin.
    • ✅ Expected: the Amazon Pay metabox is visible and functional.
  5. Disable HPOS and confirm that the metabox still appears normally.

Other information:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Changelog entry

Fix – Display Amazon Pay metabox on Subscription edit screen when HPOS is enabled.

Copy link

@alexiglesias31 alexiglesias31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants