$product
$product : \WC_Product
Handles the display of an individual product in a restaurant menu.
$options : \Barn2\Plugin\WC_Restaurant_Ordering\Menu\Menu_Options
$template_loader : \Barn2\WRO_Lib\Template_Loader
__construct(\WC_Product $product, \Barn2\Plugin\WC_Restaurant_Ordering\Menu\Menu_Options $options)
\WC_Product | $product | |
\Barn2\Plugin\WC_Restaurant_Ordering\Menu\Menu_Options | $options |
get_order_type() : string
Determines the available order type for a product based on the order type for this Menu_Section.
If the order type is 'quick', we check if the product supports that or whether we need to force the modal. Products which always require a modal include variable products.
If using WooCommerce Product Addons we don't know at this stage whether there are addons for the product, so in this case we return 'check'. If this product is ordered, we then perform the full check on the product and either add the product (if there are no addons) or show the modal if there are.
The supported order type (quick, check or modal)