Skip to content

Instantly share code, notes, and snippets.

@freelancedaddytv
Created November 11, 2017 14:15
Show Gist options
  • Save freelancedaddytv/544b8dff772d4ce632bda7ae58022529 to your computer and use it in GitHub Desktop.
Save freelancedaddytv/544b8dff772d4ce632bda7ae58022529 to your computer and use it in GitHub Desktop.
Add Prefix To Woocommerce Price
add_filter( 'woocommerce_get_price_html', 'woo_prefix_text', 100, 2 );
function woo_prefix_text( $price, $product ){
/* Change FROM word to any text you want */
$price = 'FROM ' . $price ;
return apply_filters( 'woocommerce_get_price', $price );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment