Worden WooCommerce-B2B- of kortingsplugins in de pdf ondersteund?
We gebruiken de standaardfunctie get_price_html van WooCommerce om de prijs van een product op te halen. Haakt je B2B- of kortingsplugin van derden in op deze functie, dan werkt het.
Je kunt ook zelf inhaken op het filter dat daar wordt toegepast, zoals hieronder:
// 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 );