Open sidedwards opened 4 years ago
@sidedwards thanks for the report! We'll look at ways that can be improved for a future update.
In the meantime, you could use the sv_wc_apple_pay_is_available
filter for determining Apple Pay availability that could be used to disable it in certain circumstances, like for guest users or users with certain permissions.
For instance, a snippet like this would do the trick:
function sv_wc_conditional_apple_pay( $is_available ) {
if ( $is_available && ! get_current_user_id() && 'yes' !== get_option( 'woocommerce_enable_guest_checkout' ) ) {
$is_available = false;
}
return $is_available;
}
add_filter( 'sv_wc_apple_pay_is_available', 'sv_wc_conditional_apple_pay' );
I have guest checkout disabled in my WooCommerce settings.
However, when I create orders through Apple Pay, it allows guest checkout.
I noticed the WooCommerce Stripe gateway had the same issue a while back. https://github.com/woocommerce/woocommerce-gateway-stripe/issues/148
Is there any workaround to this?