woocommerce_install_get_tables
Filter the list of known WooCommerce tables.
If WooCommerce plugins need to add new tables, they can inject them here.
Использование
add_filter( 'woocommerce_install_get_tables', 'wp_kama_woocommerce_install_get_tables_filter' ); /** * Function for `woocommerce_install_get_tables` filter-hook. * * @param array $tables An array of WooCommerce-specific database table names. * * @return array */ function wp_kama_woocommerce_install_get_tables_filter( $tables ){ // filter... return $tables; }
- $tables(массив)
- An array of WooCommerce-specific database table names.
Список изменений
С версии 3.4.0 | Введена. |
Где вызывается хук
woocommerce_install_get_tables
woocommerce/includes/class-wc-install.php 1911
$tables = apply_filters( 'woocommerce_install_get_tables', $tables );