rkasutan
Forum Replies Created
-
Hello
Thank you for the quick fix. I have made some tests and it now works perfectly.
Best Regards
Hello
Thank you for your answer.
Our shipping ID is “mondialrelay_official_shipping”
Best Regards
Rodolphe
Hello
It is finally working.
Thank you for all your support.
Best Regards
RodolpheHello
Sorry for the late reply (I hope this thread is still open).
First of all, thanks for your modification and your snippet, it is working. I can now save the data I need in the command custom fields. I had some hard times to make it work, but I had problems on my side too. Everything is now OK for this part.Unfortunatly, I have another issue with your plugin. I also need to change the expedition address of the command in WooCommerce (‘_shipping_company’, ‘_shipping_address_1’, ‘_shipping_address_2’, ‘_shipping_postcode’, ‘_shipping_city’ and ‘_shipping_country`). For the moment I can’t and I have found why. Your plugin is updating this address very late in the process and I can’t change this address after your change. It is made on line 1372 in this file :
express-checkout-paypal-payment-gateway-for-woocommerce/includes/class-paypal-express-api.php
Can you add a Hook for me to act after your change or a Filter so that I can change the address you will use ?
Thank You for your help
RodolpheHello
Have you check my last post ?
Thank you
RodolpheHello
Thank you for your answer.
You are right, this hook is called with your plugin. I have continued the analysis of this incompatibility and the problem seems to lie with the data contained in the $POST, or to be more precise the absence of data in the $POST.
The plugin Mondial Relay adds HTML fields in the checkout page to store some data (like the code of the relay point chosen by the client). With the Hook “woocommerce_checkout_update_order_meta”, the plugin store those values in the custom fields of the order. To do that, it uses the $POST :if ($_POST[‘mrwp_parcel_shop_id’]) {
update_post_meta($order_id, ‘Mondial Relay Parcel Shop ID’, sanitize_text_field($_POST[‘mrwp_parcel_shop_id’]));
}It seems that when the “woocommerce_checkout_update_order_meta” Hook is called, the $POST does not contain those datas anymore with your payment method (It works well with other payments method).
Do you know why this happens ?
Thank you for your help.
Rodolphe- This reply was modified 3 years ago by rkasutan.