Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This code snippet will remove the word From: in the WooCommerce Bookings price display
function custom_booking_product_price( $price, $product ) {
$target_product_types = array(
'booking'
);
if ( in_array ( $product->product_type, $target_product_types ) ) {
$price = str_replace("From:", "", $price);
return $price;
}
// return normal price
return $price;
}
add_filter('woocommerce_get_price_html', 'custom_booking_product_price', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment