woocommerce_data_stores filter-hookWC 1.0

Tells WC_Data_Store which object (coupon, product, order, etc) store we want to work with.

Usage

add_filter( 'woocommerce_data_stores', 'wp_kama_woocommerce_data_stores_filter' );

/**
 * Function for `woocommerce_data_stores` filter-hook.
 * 
 * @param string $object_type Name of object.
 *
 * @return string
 */
function wp_kama_woocommerce_data_stores_filter( $object_type ){

	// filter...
	return $object_type;
}
$object_type(string)
Name of object.

Where the hook is called

WC_Data_Store::__construct()
woocommerce_data_stores
woocommerce/includes/class-wc-data-store.php 82
$this->stores      = apply_filters( 'woocommerce_data_stores', $this->stores );

Where the hook is used in WooCommerce

woocommerce/src/Admin/API/Init.php 44
add_filter( 'woocommerce_data_stores', array( __CLASS__, 'add_data_stores' ) );