Title: WPAE &#8211; export selected items only
Last modified: December 9, 2019

---

# WPAE – export selected items only

 *  Resolved [solarbotics](https://wordpress.org/support/users/solarbotics/)
 * (@solarbotics)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/wpae-export-selected-items-only/)
 * I continue to be impressed with the quality of the plugin, and more-so with the
   support Soffly offers it.
 * To document a solution they generated for me regarding my issue, I thought I 
   would echo it here.
 * I am using the WP All Export to Google feed XML generator, and am doing it in
   product batches. There isn’t a built-in method to feed it a list of SKUs I want
   to dump, so I asked for their assistance on how to feed it a list.
 * For the record, here’s their (excellent) response, which I look forward to implementing:
 * > >> Is there some PHP-fu I could use to add a filter against a list with WPAE?
   > Yes, you could use our wp_all_export_csv_rows hook for this: [https://github.com/soflyy/wp-all-import-action-reference/blob/master/all-export/wp_all_export_csv_rows.php](https://github.com/soflyy/wp-all-import-action-reference/blob/master/all-export/wp_all_export_csv_rows.php).
   > Here’s an example snippet that you can modify to work with SKUs instead of 
   > Order IDs:
   > function my_export_csv_rows( $articles, $options, $export_id ) {
   >  if ( $export_id == ’10’ ) {
   >  $export_these = array( ‘123’, ‘345’, ‘567’, ‘
   > 789’, ‘748’, ‘753’ );
   >  foreach ( $articles as $key => $article ) {
   >  if ( ! in_array( $article[‘Order ID’], $export_these ) ) {
   >  unset( $articles[
   > $key ] ); }
   >  }
   >  } return $articles; } add_filter( ‘wp_all_export_csv_rows’, ‘my_export_csv_rows’,
   > 10, 3 );
   > Keep in mind that the record count displayed won’t change but the file that’s
   > generated will be properly filtered.
 * Again, thanks again for the excellent product & support.

The topic ‘WPAE – export selected items only’ is closed to new replies.

 * ![](https://ps.w.org/wp-all-export/assets/icon-256x256.png?rev=2570162)
 * [WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel](https://wordpress.org/plugins/wp-all-export/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-all-export/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-all-export/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-all-export/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-all-export/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-all-export/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [solarbotics](https://wordpress.org/support/users/solarbotics/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/wpae-export-selected-items-only/)
 * Status: resolved