Skip to content

Instantly share code, notes, and snippets.

@stuartduff
Last active December 15, 2022 16:09
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Remove the word From: before WooCommerce Bookings Price [Temp Fix #3459]
/**
* Temp Fix for the Bookings issue below.
* #3459
*/
function temp_price_fix_bookings( $price, $product ) {
$target_product_types = array(
'booking'
);
if ( in_array ( $product->product_type, $target_product_types ) ) {
// if bookable product remove From: before price
return wc_price( $product->get_price() );
}
// return normal price
return $price;
}
add_filter('woocommerce_get_price_html', 'temp_price_fix_bookings', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment