Closed mattallan closed 12 months ago
Tests I've performed:
Given this only affects the hpos screen, I did a diff on what stylesheet handles are loaded on the edit post subscription screen and what ones are missing on the HPOS edit screen. What I found is that these are the missing ones:
wc-components
wc-admin-layout
wc-customer-effort-score
wc-product-editor
wp-components
wc-experimental
wc-admin-app
So this PR does fix it by loading the wc-components
which contains the missing wp admin variables. The other handles listed all looked like dependancies of the WC_ADMIN_APP
('wc-admin-app'
). And so, after some digging what I've discovered is that these styles were automatically loaded on the wp-post edit screen because WC loads the 'wc-admin-app'
scripts and the rest (including wc-components
) are loaded as dependancies.
It doesn't load it on the HPOS screen because the edit subscription screen isn't considered one of WC's screens as defined by this PageController::is_admin_or_embed_page()
function.
Fixes https://github.com/woocommerce/woocommerce-subscriptions/issues/4563
Description
For stores with HPOS enabled, there are some styles missing on the Edit Subscription page which is noticeable when trying to update the subscription status:
This issue is caused by a missing dependency (
wc-components
) when registering our admin stylesheet.Expected look:
How to test this PR
trunk
you should notice no borders or on-hover stylesProduct impact