(Issue) Broken / Wrong display of "Tiered Price" or "Custom Information" tables

You may encounter issues with how the 'tiered price table' or the 'custom information table' is displayed. They may be too close to the "Add to Cart" button or otherwise broken.


Broken tiered price table display

This can happen because each theme is slightly different and the hook (insertion point of the table) can sometimes not work well with a certain theme.

Here's how to fix it:

add_action('plugins_loaded', function(){
	global $b2bking_public;
	remove_action('woocommerce_after_add_to_cart_button', array($b2bking_public,'b2bking_show_tiered_pricing_table'));
	remove_action('woocommerce_after_add_to_cart_button', array($b2bking_public,'b2bking_show_custom_information_table'));
	add_action('woocommerce_after_add_to_cart_form', array($b2bking_public,'b2bking_show_tiered_pricing_table'));
	add_action('woocommerce_after_add_to_cart_form', array($b2bking_public,'b2bking_show_custom_information_table'));

If that worked, then the table would be placed after the add to cart button and would display correctly:

If that did not work, it may be needed to use yet another hook. You can find a list of possible hooks to use here: https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/

You can replace 'woocommerce_after_add_to_cart_form' with any hook from the above article until you find a location which works.

If you are not able to resolve the issue, our support team will also be happy to assist - please just open a ticket with us at https://webwizards.ticksy.com

Add to cart button does not exist #

If you have a situation where the add to cart button does not exist, the tables may not appear either, as they are normally set to appear after those buttons.

To resolve it, add the above code snippet to the site, and replace 'woocommerce_after_add_to_cart_form' with "woocommerce_product_meta_start" or another hook from the above businessbloomer article.

Powered by BetterDocs