woocommerce_product_price_class
Использование
add_filter( 'woocommerce_product_price_class', 'wp_kama_woocommerce_product_price_class_filter' ); /** * Function for `woocommerce_product_price_class` filter-hook. * * @param $string * * @return */ function wp_kama_woocommerce_product_price_class_filter( $string ){ // filter... return $string; }
- $string
- -
Где вызывается хук
В файле: /templates/single-product/price.php
woocommerce_product_price_class
woocommerce/templates/single-product/price.php 25
<p class="<?php echo esc_attr( apply_filters( 'woocommerce_product_price_class', 'price' ) ); ?>"><?php echo $product->get_price_html(); ?></p>