Use "Pay now" label only if no review

This commit is contained in:
Alex P 2023-04-27 12:49:26 +03:00
parent b478d9adaa
commit 694aafd346
No known key found for this signature in database
GPG key ID: 54487A734A204D71

View file

@ -60,9 +60,8 @@ If disabled, the Checkout page is skipped for Block Express payments.
},
'button.pay-now-contexts' => function ( ContainerInterface $container, array $contexts ): array {
$contexts[] = 'checkout-block';
if ( ! $container->get( 'blocks.settings.final_review_enabled' ) ) {
$contexts[] = 'checkout-block';
$contexts[] = 'cart-block';
}