action or hook to display add-on options?
-
Hi,
I’m curious what method I should use in order to display the options for the products in a custom page (where currently none of the ‘add-ons’ options are working or displaying);
I’ve tried using something along the lines of:
add_action( 'woocommerce_before_add_to_cart_button', array( $this, 'show_product_options' ), 15 );
But this doesn’t seem to have any effect. Listing a number of products in a page (not the single product page) and they are “simple” products (not product variations — yet)
However, using the WooCommerce Product Add-Ons plugin, I’ve managed to get the options for simply products to display using
add_action( 'woocommerce_before_add_to_cart_button', array($GLOBALS['Product_Addon_Display'], 'display'), 10);
But I’d rather use your plugin as it includes support for product variations, unlike the WooCommerce one, but need to ensure it will work with my custom page before purchasing.
Any help is appreciated!
- The topic ‘action or hook to display add-on options?’ is closed to new replies.