wc_get_price_decimals
Return the number of decimals after the decimal point.
Usage
add_filter( 'wc_get_price_decimals', 'wp_kama_wc_get_price_decimals_filter' ); /** * Function for `wc_get_price_decimals` filter-hook. * * @param $option * * @return */ function wp_kama_wc_get_price_decimals_filter( $option ){ // filter... return $option; }
- $option
- -
Changelog
Since 2.3 | Introduced. |
Where the hook is called
wc_get_price_decimals
woocommerce/includes/wc-formatting-functions.php 539
return absint( apply_filters( 'wc_get_price_decimals', get_option( 'woocommerce_price_num_decimals', 2 ) ) );