Thanks Alex for your quick reply.
Sorry, but I do not know how to add 5 days to the date.
Could you please precise how to replace this part :
$value = “text”;
Thanks a lot !
I write the whole PHP this way :
add_filter(‘woe_get_order_value_custom_dlc_date’,function ($value, $order,$fieldname) {
$value = “<?php echo $date_i18n( wc_date_format(), strtotime( $order->order_date ) + 30 * DAY_IN_SECONDS ); ?>”;
return $value;
},10,3);
Does not work 🙁
Try something like
add_filter(‘woe_get_order_value_custom_dlc_date’,function ($value, $order,$fieldname) {
$value = date_i18n( wc_date_format(), strtotime( $order->order_date ) + 5 * DAY_IN_SECONDS );
return $value;
},10,3);
This last version of code you just sent seems valid, because no error (with “Enable debug output” option checked).
But still not working. Here SQL details :
SELECT ID AS order_id FROM bsk_posts AS orders LEFT JOIN bsk_postmeta AS ordermeta_cf_export_unmarked_orders ON ordermeta_cf_export_unmarked_orders.post_id = orders.ID AND ordermeta_cf_export_unmarked_orders.meta_key=’woe_order_exported’ WHERE orders.post_type in ( ‘shop_order’) AND 1 AND orders.post_status in (‘wc-processing’) AND orders.post_status NOT in (‘auto-draft’,’trash’) AND ( ordermeta_cf_export_unmarked_orders.meta_value IS NULL )
Nota bene : the database has standard table prefix “wp_” replaced by “bsk_”
Hello
I’m in the hospital and has no access to computer. I can only suggest to hire programmer to debug this code.
Thanks, Alex
I am sorry for your situation ! Hope it is not too bad.
Unfortunately, I have no finantial possibility to hire programmer.
That’s too bad. The business for this website I am trying to launch is only for fresh food… Well, guess I have to abandon it.
Anyway, thanks for your help.
I used key “custom_dlc_date” , see updated code
add_filter("woe_get_order_value_custom_dlc_date",function ($value, $order,$fieldname) {
$value = date_i18n( wc_date_format(), strtotime( $order->order_date ) + 5 * DAY_IN_SECONDS );
return $value;
},10,3);