woocommerce_(object_type)_data_store
Использование
add_filter( 'woocommerce_(object_type)_data_store', 'wp_kama_woocommerce_object_type_data_store_filter' ); /** * Function for `woocommerce_(object_type)_data_store` filter-hook. * * @param $object_type ] * * @return */ function wp_kama_woocommerce_object_type_data_store_filter( $object_type ] ){ // filter... return $object_type ]; }
- $object_type ]
- -
Где вызывается хук
woocommerce_(object_type)_data_store
woocommerce/includes/class-wc-data-store.php 92
$store = apply_filters( 'woocommerce_' . $object_type . '_data_store', $this->stores[ $object_type ] );
Где используется хук в WooCommerce
woocommerce/src/Internal/DataStores/Orders/CustomOrdersTableController.php 140
self::add_filter( 'woocommerce_order_data_store', array( $this, 'get_orders_data_store' ), 999, 1 );
woocommerce/src/Internal/DataStores/Orders/CustomOrdersTableController.php 141
self::add_filter( 'woocommerce_order-refund_data_store', array( $this, 'get_refunds_data_store' ), 999, 1 );