/**
* Prevent Apple Pay orders from auto-completing
* Keeps them in "Processing" status after payment
*/
add_filter( 'woocommerce_payment_complete_order_status', 'force_apple_pay_to_stay_processing', 9999, 3 );
function force_apple_pay_to_stay_processing( $status, $order_id, $order = false ) {
if ( ! $order ) {
$order = wc_get_order( $order_id );
}
if ( ! $order ) {
return $status;
}
// List of common payment method IDs that represent Apple Pay
// Adjust / add your real one after testing
$apple_pay_methods = [
'woopayments', // WooPayments (most common in 2025/2026)
'stripe', // Official Stripe plugin (often uses this even for Apple Pay)
'stripe_applepay',
'paypal_applepay', // PayPal Payments Apple Pay
'ppec_paypal_applepay', // older PayPal
'applepay', // some custom / other gateways
'square_applepay', // Square
// 'braintree_applepay' // if using Braintree
];
$used_method = $order->get_payment_method();
// If it's Apple Pay → force it back to processing
if ( in_array( $used_method, $apple_pay_methods, true ) ) {
return 'processing';
}
// Otherwise keep whatever WooCommerce / other plugins decided
return $status;
}
Apple pay Stay in processing
Code created on: 2026-02-04 12:38:30