Skip to content

Instantly share code, notes, and snippets.

@SiR-DanieL
Created March 4, 2022 04:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SiR-DanieL/8b4b1fd9994f0c0c82a49eea8e63cd3d to your computer and use it in GitHub Desktop.
Save SiR-DanieL/8b4b1fd9994f0c0c82a49eea8e63cd3d to your computer and use it in GitHub Desktop.
Remove the "From:" in bookable product prices
add_filter( 'woocommerce_get_price_html', 'wc_edit_bookable_remove_from_price', 10, 2 );
function wc_edit_bookable_remove_from_price( $html, $product ) {
if ( ! $product->is_type( 'booking' ) ) {
return $html;
}
return str_replace( 'From: ', '', $html );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment