Hi @threadi
Having the customer review their address and payment info after using express checkout kind of defeats the purpose of using express checkout in the first place.
Why not just disable express checkout and use PayPal in the payment method section of the checkout page? That way you can ensure the address info entered by the customer is the most up to date.
Kind Regards
Express Checkout speeds up the ordering process for many customers. In the shop in question, this accounts for a large proportion of all purchases. Interestingly, without Express Checkout, sales collapse. Unfortunately, doing without it is therefore not an option.
Unfortunately, a not inconsiderable number of customers send the wrong/outdated address to the shop, resulting in a large number of subsequent adjustments or even incorrectly sent packages. The aim is to prevent exactly that. Hence the question of whether you can go to a page after the Express Checkout where you can adjust the delivery address again? It could also be the order confirmation page, only with the option to adjust the address?
H @threadi
What you’re describing is not currently supported by the plugin and would require a code change to accommodate your request.
You can add this address review step using custom code however. You can simply intercept the WooCommerce checkout request and redirect the user to the confirmation page. Once the user accepts, the order would then process. WooCommerce provides all of the filters needed to add this type of functionality.
Kind Regards,
Would have no problem writing that. Do you know where I can intercept the WooCommerce checkout request (which hook)? At the moment the customer is taken directly to the thank you page. Do you have a tip for this? If not, I’ll look for it.
You can use one of several filters.
wc_ppcp_process_payment_result https://plugins.trac.projectdmc.org/browser/pymntpl-paypal-woocommerce/trunk/src/Payments/Gateways/AbstractGateway.php#L194
woocommerce_checkout_order_processed
Using wc_ppcp_process_payment_result will be the easiest because that’s only called when the PayPal plugin is processing the payment. You can short circuit the payment process and provide a redirect url to your address page.
Simple Example:
add_filter('wc_ppcp_process_payment_result', function($result, $order, $gateway){
if($gateway->payment_handler->get_paypal_order_id_from_request()){
$result = ['result' => 'success', 'redirect' => 'https://example.com'];
}
return $result;
}, 10, 3);
After the user confirms, you would then need to call the payment process again to ensure the payment is completed.
