Skip to content

Instantly share code, notes, and snippets.

@ChrisCree
Created March 10, 2015 19:06
Show Gist options
  • Save ChrisCree/10df935146ccdc627eee to your computer and use it in GitHub Desktop.
Save ChrisCree/10df935146ccdc627eee to your computer and use it in GitHub Desktop.
Change WooCommerce $0 zero price output from Free! to something else.
<?php
// Do not copy the opening <?php tag above
// Customize the Free! price output
add_filter( 'woocommerce_variable_free_price_html','wsm_custom_free_price' );
add_filter( 'woocommerce_free_price_html', 'wsm_custom_free_price' );
add_filter( 'woocommerce_variation_free_price_html', 'wsm_custom_free_price' );
function wsm_custom_free_price( $price ) {
// Edit content between single quotes below to desired output
return 'Prepaid Inventory';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment