Beaver Themer and WC Memberships - Discount and Restricted Messages

If you’re using WooCommerce and WooCommerce Memberships, you might have a discounted product or a restricted product that is available to active members.

Normally when viewing a Singular Product, you would see a notice under the Add to Cart button that notifies your customer about a purchasing discount or a product restriction. These notices are hooked in using the woocommerce_single_product_summary action.

However, if you’re using Beaver Themer to display your Singular Product, that action doesn’t exist, so those notices don’t get displayed.

In order to display those notices, you’ll want to create a custom module with the following code as your frontend.php

if (FLBuilderModel::is_builder_active()) : ?>
	<div class="fl-builder-module-placeholder-message">wc_memberships_discount_and_restricted_message(s)</div>
<?php endif;
if (function_exists('wc_memberships')) :
	echo WC_Memberships_Products_Restrictions::display_product_purchasing_discount_message();
	echo WC_Memberships_Products_Restrictions::display_product_purchasing_restricted_message();

Hello. I am having difficulty also:

Using a plugin (Product Enquiry Pro) that adds a button after woocommerce_single_product_summary, but when using a Beaver Themer Layout for Woo single product pages, the button is not displayed due to the absence of woocommerce_single_product_summary from themer layouts.

Is there any way I can add the hook for woocommerce_single_product_summary into a themer layout?

Or is there a better way to do this?

The plugin also has the ability to display the button using a shortcode, but the shortcode has to contain the product ID which for obvious reasons doesn’t work with a themer layout that applies to all products…

Any help would be greatly apprecitated. Thanks in advance :slight_smile: