Skip to content

Commit

Permalink
Allow WooPay button preview on settings page (#8422)
Browse files Browse the repository at this point in the history
  • Loading branch information
LCmry authored Mar 20, 2024
1 parent c266b38 commit fa5adee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog/fix-woopay-button-preview-style
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Allow WooPay button preview on settings page
2 changes: 1 addition & 1 deletion includes/class-wc-payments-blocks-payment-method.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function is_active() {
*/
public function get_payment_method_script_handles() {

if ( ( is_cart() || is_checkout() || is_product() || has_block( 'woocommerce/checkout' ) || has_block( 'woocommerce/cart' ) ) ) {
if ( ( is_cart() || is_checkout() || is_product() || has_block( 'woocommerce/checkout' ) || has_block( 'woocommerce/cart' ) || is_admin() ) ) {
WC_Payments_Utils::enqueue_style(
'wc-blocks-checkout-style',
plugins_url( 'dist/blocks-checkout.css', WCPAY_PLUGIN_FILE ),
Expand Down

0 comments on commit fa5adee

Please sign in to comment.