verygoodplugins

Untitled

May 24th, 2021 (edited)
1,067
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1. function my_custom_export() {
  2.  
  3.     $args = array(
  4.         'numberposts' => - 1,
  5.         'post_type'   => 'shop_order',
  6.         'post_status' => array( 'wc-processing', 'wc-completed' ),
  7.         'fields'      => 'ids',
  8.         'meta_query'  => array(
  9.             array(
  10.                 'key'     => 'wpf_complete',
  11.                 'compare' => 'NOT EXISTS',
  12.             ),
  13.         ),
  14.         'date_query'  => array(
  15.             'after' => 'March 1 2020',
  16.         ),
  17.     );
  18.  
  19.     $orders = get_posts( $args );
  20.  
  21.     return $orders;
  22.  
  23. }
  24.  
  25. add_filter( 'wpf_batch_woocommerce_init', 'my_custom_export', 20 );
Add Comment
Please, Sign In to add comment