Title: Unserialize data from PostNL plugin
Last modified: November 29, 2019

---

# Unserialize data from PostNL plugin

 *  Resolved [anoukaveresch](https://wordpress.org/support/users/anoukaveresch/)
 * (@anoukaveresch)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/unserialize-data-from-postnl-plugin/)
 * Hi,
 * I’m having trouble unserializing the data from the postnl plugin ([https://nl.wordpress.org/plugins/woo-postnl/](https://nl.wordpress.org/plugins/woo-postnl/)).
   
   I want to get the delivery date. I can get all the delivery options, through 
   the dropdown ([https://imgur.com/X3zgENH](https://imgur.com/X3zgENH)), but it’s
   serialized data
 * a:4:{s:4:”date”;s:10:”2019-11-19″;s:4:”time”;a:1:{i:0;a:7:{s:5:”start”;s:8:”13:
   15:00″;s:3:”end”;s:8:”15:45:00″;s:12:”collect_date”;N;s:5:”price”;a:2:{s:8:”currency”;
   s:3:”EUR”;s:6:”amount”;i:0;}s:13:”price_comment”;s:8:”standard”;s:7:”comment”;
   s:0:””;s:4:”type”;i:2;}}s:9:”signature”;i:0;s:14:”only_recipient”;i:0;}
 * How can I get just the date (in this case ‘2019-11-19’) from this data?
 * Thanks in advance!
    -  This topic was modified 6 years, 6 months ago by [anoukaveresch](https://wordpress.org/support/users/anoukaveresch/).

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/unserialize-data-from-postnl-plugin/#post-12189818)
 * hi
 * please, open section “Misc Settings” and add following PHP code.
    thanks, Alex
 *     ```
       add_filter('woe_get_order_value__postnl_delivery_options', function ($value, $order, $fieldname) {
       	return $value['date'];
       }, 10, 3);
       ```
   
 *  Thread Starter [anoukaveresch](https://wordpress.org/support/users/anoukaveresch/)
 * (@anoukaveresch)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/unserialize-data-from-postnl-plugin/#post-12190330)
 * This didn’t work, as I get the wrong date..
 * `<Delivery_date>2019-11-29 23:23</Delivery_date>`
 * I get the date of today instead of the date that is stored in the unserialized
   array (2019-11-19).
    I’ve checked the preview as well as the exported version,
   but in both versions the date is wrong..
    -  This reply was modified 6 years, 6 months ago by [anoukaveresch](https://wordpress.org/support/users/anoukaveresch/).
    -  This reply was modified 6 years, 6 months ago by [anoukaveresch](https://wordpress.org/support/users/anoukaveresch/).
      Reason: sollution didn't worked as expected
 *  Thread Starter [anoukaveresch](https://wordpress.org/support/users/anoukaveresch/)
 * (@anoukaveresch)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/unserialize-data-from-postnl-plugin/#post-12190335)
 * deleted message
    -  This reply was modified 6 years, 6 months ago by [anoukaveresch](https://wordpress.org/support/users/anoukaveresch/).
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/unserialize-data-from-postnl-plugin/#post-12196078)
 * have this code solved your problem ?
 *  Thread Starter [anoukaveresch](https://wordpress.org/support/users/anoukaveresch/)
 * (@anoukaveresch)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/unserialize-data-from-postnl-plugin/#post-12196138)
 * No.. I’ll send you the mysql of the postnl plugin via the helpdesk right now
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/unserialize-data-from-postnl-plugin/#post-12196463)
 * correct code
    `add_filter(‘woe_get_order_value__postnl_delivery_options’, function(
   $value, $order, $fieldname) { $data = maybe_unserialize($value); if( is_array(
   $data) ) $value = $data[‘date’]; return $value; }, 10, 3);
 *  Thread Starter [anoukaveresch](https://wordpress.org/support/users/anoukaveresch/)
 * (@anoukaveresch)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/unserialize-data-from-postnl-plugin/#post-12196494)
 * Thank you so much! It works perfectly.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Unserialize data from PostNL plugin’ is closed to new replies.

 * ![](https://ps.w.org/woo-order-export-lite/assets/icon-256x256.png?rev=1365554)
 * [Advanced Order Export For WooCommerce](https://wordpress.org/plugins/woo-order-export-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-order-export-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-order-export-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-order-export-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-order-export-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-order-export-lite/reviews/)

## Tags

 * [export](https://wordpress.org/support/topic-tag/export/)
 * [Postnl](https://wordpress.org/support/topic-tag/postnl/)
 * [serialized](https://wordpress.org/support/topic-tag/serialized/)
 * [SERIALIZED DATA](https://wordpress.org/support/topic-tag/serialized-data/)

 * 7 replies
 * 2 participants
 * Last reply from: [anoukaveresch](https://wordpress.org/support/users/anoukaveresch/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/unserialize-data-from-postnl-plugin/#post-12196494)
 * Status: resolved