There is an issue when I look to the delivery date column located on woocommerce’s orders list at the back-end of my site. It shows different dates than the ones that are stored at the order details.
Digging a little bit on the code, I found the problem on this function “orddd_lite_woocommerce_custom_column_value” at “/includes/settings/class-orddd-lite-filter.php”
This function references to $post->ID instead of $the_order->get_id()
I think the function should be like this:
/**
This function adds the Delivery Date for each order on WooCommerce->Orders page
@param str $column - Name of the column.
@since 1.9
*/
public static function orddd_lite_woocommerce_custom_column_value( $column ) {
global $the_order, $orddd_lite_date_formats;
if ( 'order_delivery_date' === $column ) {
$delivery_date_formatted = Orddd_Lite_Common::orddd_lite_get_order_delivery_date( $the_order->get_id() );
echo esc_attr( $delivery_date_formatted );
$time_slot = orddd_lite_common::orddd_get_order_timeslot( $the_order->get_id() );
echo '
Here is the suggestion from one of our clients.
There is an issue when I look to the delivery date column located on woocommerce’s orders list at the back-end of my site. It shows different dates than the ones that are stored at the order details. Digging a little bit on the code, I found the problem on this function “orddd_lite_woocommerce_custom_column_value” at “/includes/settings/class-orddd-lite-filter.php” This function references to $post->ID instead of $the_order->get_id()
I think the function should be like this:
/**
@since 1.9 */ public static function orddd_lite_woocommerce_custom_column_value( $column ) { global $the_order, $orddd_lite_date_formats; if ( 'order_delivery_date' === $column ) { $delivery_date_formatted = Orddd_Lite_Common::orddd_lite_get_order_delivery_date( $the_order->get_id() ); echo esc_attr( $delivery_date_formatted ); $time_slot = orddd_lite_common::orddd_get_order_timeslot( $the_order->get_id() ); echo '
' . esc_attr( $time_slot ) . '
'; } }Ticket link: https://wordpress.org/support/topic/wrong-delivery-dates-on-orders-list/
I tried many scenarios to replicate the issue but I was unable to reproduce it.