diff --git a/changelog/fix-7588-woopay-subscription-variation b/changelog/fix-7588-woopay-subscription-variation new file mode 100644 index 00000000000..06f44dc9845 --- /dev/null +++ b/changelog/fix-7588-woopay-subscription-variation @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Edge case adding subscription_variation to WooPay button supported types + + diff --git a/includes/class-wc-payments-woopay-button-handler.php b/includes/class-wc-payments-woopay-button-handler.php index d69cae52083..44154c29ee7 100644 --- a/includes/class-wc-payments-woopay-button-handler.php +++ b/includes/class-wc-payments-woopay-button-handler.php @@ -272,7 +272,7 @@ public function ajax_add_to_cart() { WC()->cart->add_to_cart( $product->get_id(), $quantity, $variation_id, $attributes ); } - if ( in_array( $product_type, [ 'simple', 'subscription', 'bundle', 'mix-and-match' ], true ) ) { + if ( in_array( $product_type, [ 'simple', 'subscription', 'subscription_variation', 'bundle', 'mix-and-match' ], true ) ) { WC()->cart->add_to_cart( $product->get_id(), $quantity ); }