Skip to content
No results
  • Admin Panel
  • Security
  • Optimization
  • WooCommerce
    • General
    • Products
    • Coupon
    • Cart & Checkout
  • Management
  • Content
  • Media
  • Elementor
  • Gutenberg
Snipjar
No results
  • Admin Panel
  • Security
  • Optimization
  • WooCommerce
    • General
    • Products
    • Coupon
    • Cart & Checkout
  • Management
  • Content
  • Media
  • Elementor
  • Gutenberg
Snipjar
  • General, WooCommerce

Change “$0.00” to “Free”

add_filter( 'woocommerce_get_price_html', 'ecommercehints_change_zero_price_display', 10, 2 );
function ecommercehints_change_zero_price_display( $price, $product ) {
if (empty($product->get_price()) || $product->get_price() == 0) { // If price is not entered or set to 0
$price = __( 'Free', 'woocommerce' );
}
return $price;
}
Previous Post Remove Dashboard widgets
Next Post Remove Order Notes in checkout page
  • Privacy Policy

Curated with ❤️ by Snipjar.