• Resolved anheco

    (@anheco)


    Hello
    we have a recurring issue with the plugin.
    For some customers using the Paypal payment (no problem with other payment methods), the town info is missing in the order overview.
    The town field is present the module log’s response from paypal so the field was filled by the customer but at some point it is cleard and disappears from order overview.
    Any idea why?

    Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @anheco,

    We have checked the issue and we are unable able to replicate the issue. The city field data is saved correctly.

    Kindly share us a full-page screenshot of the PayPal plugin settings page so that we can try with the combination of the same settings.

    Thread Starter anheco

    (@anheco)

    Hello
    thanks for your reply.
    Unfortunately the issue is not happening consistently and though hard to reproduce.
    Find attached a full settings page screenshot ( https://ibb.co/qMyPLwS ) and a capture from an order with the issue ( https://ibb.co/N3hQTHM )

    Thanks

    Plugin Author WebToffee

    (@webtoffee)

    Hi @anheco,

    Please share the PayPal logs of the same order. You can find it from Woocommerce > Status > Logs > Eh-paypal-express logs.

    Thread Starter anheco

    (@anheco)

    Plugin Author WebToffee

    (@webtoffee)

    Hi @anheco,

    Upon checking the logs, the response from PayPal also includes the data, which means it should have been saved in the order details.

    Here is a code snippet we provided for another user who had similar issue. Please try adding the below code snippet to your active theme’s functions.php.

    add_filter( 'eh_paypal_post_value_update_on_review', 'paypal_post_value_update_on_review' ,10,2);
    
    function paypal_post_value_update_on_review($post, $checkout_shipping) {
    
    	if(empty($post) ){
    		foreach ($checkout_shipping as $key => $value) {
    				if ($value) {
    					$_POST['billing_' . $key] = $value;
    				}
    			}
    			foreach ($checkout_shipping as $key => $value) {
    				if ($value) {
    					$_POST['shipping_' . $key] = $value;
    				}
    			}
    	}
    
       return $post;
    }
    Thread Starter anheco

    (@anheco)

    Hi

    thanks for the fix, I’m trying this solution and will let you know if we have further issues.

    FYI, I didn’t want to write in theme’s functions.php to make it update proof (unfortunately previous developer didn’t use a child theme and installing a child theme now could override theme’s settings which I’d like to avoid)

    So I’ve put your snippet in a custom plugin embedded this way :

    add_action( 'plugins_loaded', function() {
    
    	add_filter( 'eh_paypal_post_value_update_on_review', 'paypal_post_value_update_on_review' , 10 , 2 );
    
    	function paypal_post_value_update_on_review($post, $checkout_shipping) {
    
    		if( empty($post) ) {
    
    			foreach ($checkout_shipping as $key => $value) {
    				if ($value) {
    					$_POST['billing_' . $key] = $value;
    				}
    			}
    
    			foreach ($checkout_shipping as $key => $value) {
    				if ($value) {
    					$_POST['shipping_' . $key] = $value;
    				}
    			}
    		}
    	   return $post;
    	}
    });

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Town field missing in shipping info’ is closed to new replies.