myparcelnl / woocommerce

MyParcel plug-in for WooCommerce
https://developer.myparcel.nl/nl/documentatie/10.woocommerce.html
MIT License
13 stars 21 forks source link

PostNL Pickup address as shipping address #39

Open TimBlom opened 6 years ago

TimBlom commented 6 years ago

When I use the payment method of 'Afterpay' I need to send them the shipping address of the PostNL location to avoid fraud.

TimBlom commented 6 years ago

case 00267496

TimBlom commented 6 years ago

Also case 00302465

TimBlom commented 6 years ago

Also case 00396245

NikitaMyParcel commented 4 years ago

00657465 PostNL-locatie als verzendadres in plaats van aparte melding onderaan bestelbevestiging, zodat het niet theme afhankelijk is of de melding pickup locatie wordt laten zien

wgroenewold commented 3 years ago
$order = new WC_Order($order_id);
        $shipping = $order->get_data()['shipping'];

        foreach($order->get_data()['meta_data'] as $key=> $value){
            if($value->get_data()['key'] == '_postnl_delivery_options'){
                $selector = $key;
                $data = json_decode($order->get_data()['meta_data'][$selector]->get_data()['value'], true);
            }
        }

Je adres zit dan in $data['pickupLocation']

kojomba commented 1 year ago

Any update on this? I want; if the customer does choose a PostNL pickup location that the shipping address will be the PostNL pickup location. Now when I make test purchase, in the confirmation mail I see delivery information: PostNL pickup location, under that the billing address of the customer and the shipping address = billing address. I want to avoid confusion.