Are WooCommerce B2B or Discount Plugins supported in PDF?

We use the WooCommerce standard get_price_html function to get the price for a product. If your 3rd party B2B or discount plugin hooks into this function, it will work.

You could hook yourself into the filter applied there like the following:

// define the woocommerce_get_price_html callback 
function filter_woocommerce_get_price_html( $price, $instance ) { 
 
 if($instance->get_id() == 96) {
 $price = '40 €';
 }
 return $price; 
}; 
 
// add the filter 
add_filter( 'woocommerce_get_price_html', 'filter_woocommerce_get_price_html', 10, 2 );

Leave a Reply

Your email address will not be published. Required fields are marked *