Export date range using an other date field
-
Hi,
I would like to schedule an export with last month orders, but using the completed date instead of the default one.
I tried to use and custom your code samples :
// replace {yesterday} and {today} with actual values comparison operators // tweak formats for your needs! add_filter('woe_settings_validate_defaults', function ($settings) { $settings = json_encode($settings); // to string $yesterday = date("Y-m-d" , strtotime("-1 day", current_time( 'timestamp' ) )); $settings = str_replace( '{yesterday}', $yesterday, $settings); $today = date("Y-m-d" , current_time( 'timestamp' ) ); $settings = str_replace( '{today}', $today, $settings); $settings = json_decode($settings, true); // to array return $settings; } );
but in the section “filter by order” > “custom fields”,
should I use
_completed_date LIKE {tomorrow}
or_completed_date >= {today} _completed_date <= {tomorrow}
Thanks.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Export date range using an other date field’ is closed to new replies.