mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-29 11:32:21 +08:00
https://stackoverflow.com/questions/65180266/show-trailing-zeros-from-woocommerce-just-on-the-backend/65180403#65180403
10 lines
325 B
Text
10 lines
325 B
Text
function filter_woocommerce_price_trim_zeros( $trim ) {
|
|
// True if inside WordPress administration interface, false otherwise.
|
|
// if NOT true = false
|
|
if ( ! is_admin() ) {
|
|
$trim = true;
|
|
}
|
|
|
|
return $trim;
|
|
}
|
|
add_filter( 'woocommerce_price_trim_zeros', 'filter_woocommerce_price_trim_zeros', 10, 1 );
|