woocommerce_product_option_terms
Hook to display custom attribute terms.
Использование
add_action( 'woocommerce_product_option_terms', 'wp_kama_woocommerce_product_option_terms_action', 10, 3 ); /** * Function for `woocommerce_product_option_terms` action-hook. * * @param array|null $attribute_taxonomy Attribute taxonomy object. * @param number $i Attribute index. * @param WC_Product_Attribute $attribute Attribute object. * * @return void */ function wp_kama_woocommerce_product_option_terms_action( $attribute_taxonomy, $i, $attribute ){ // action... }
- $attribute_taxonomy(массив|null)
- Attribute taxonomy object.
- $i(number)
- Attribute index.
- $attribute(WC_Product_Attribute)
- Attribute object.
Список изменений
С версии 3.4.0 | Введена. |
Где вызывается хук
woocommerce_product_option_terms
woocommerce/includes/admin/meta-boxes/views/html-product-attribute-inner.php 86
do_action( 'woocommerce_product_option_terms', $attribute_taxonomy, $i, $attribute );