Skip to content
OSULZER.AT
Code1 min read· updated April 1, 2022

WooCommerce B2B Market - RRP as a Shortcode

Show the RRP from B2B Market for WooCommerce anywhere on the product page with a shortcode. Especially handy if you use a page builder.

Once again we take a quick look at the world of B2B Market for WooCommerce. This time it is about the RRP (recommended retail price) that can be set in the backend. It can also be enabled via the plugin settings and is then delivered automatically through the hook. With the following piece of code, you can display the RRP wherever you want on the product page. This is especially handy if you control your product page with a page builder, for example.

function osulzer_b2bmarket_uvp_shortcode() {

    ob_start();
    echo '<div class="osulzer-b2bmarket-uvp">';
    $show_discounts = BM_Show_Discounts::get_instance();
    $show_discounts->show_rrp();
    echo '</div>';
    return ob_get_clean();

}

add_shortcode('osulzer_b2bmarket_uvp', 'osulzer_b2bmarket_uvp_shortcode');

WooCommerce Development

Prefer to have it done for you?

Custom plugins, integrations, and B2B features for your shop - €120/h plus VAT.

See WooCommerce development

New project?

Contact.

Tell me briefly about your project - I'll get back to you personally.

Your data is used solely to handle your inquiry. More in the privacy policy.