Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function my_custom_export() {
- $args = array(
- 'numberposts' => - 1,
- 'post_type' => 'shop_order',
- 'post_status' => array( 'wc-processing', 'wc-completed' ),
- 'fields' => 'ids',
- 'order' => 'ASC',
- 'meta_query' => array(
- array(
- 'key' => 'wpf_complete',
- 'compare' => 'NOT EXISTS',
- ),
- ),
- 'date_query' => array(
- 'after' => 'March 1 2020',
- ),
- );
- $orders = get_posts( $args );
- wpf_log( 'info', 0, 'Beginning <strong>WooCommerce Orders</strong> batch operation on ' . count( $orders ) . ' orders', array( 'source' => 'batch-process' ) );
- return $orders;
- }
- add_filter( 'wpf_batch_woocommerce_init', 'my_custom_export', 20 );
Add Comment
Please, Sign In to add comment