Skip to content

Instantly share code, notes, and snippets.

@jdeeburke
Last active July 30, 2018 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdeeburke/6ea26e62f7f6685622af796c045cbef6 to your computer and use it in GitHub Desktop.
Save jdeeburke/6ea26e62f7f6685622af796c045cbef6 to your computer and use it in GitHub Desktop.
Customer/Order CSV Export: Instantiate Custom Data Store
<?php
function get_custom_csv_export_data_store( $slug ) {
if ( 'my-custom-data-store' === $slug ) {
require_once 'path/to/csv_export_custom_data_store.php';
return new Custom_CSV_Export_Data_Store();
}
}
add_filter( 'wc_customer_order_csv_export_custom_data_store', 'get_custom_csv_export_data_store' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment