\Barn2\Plugin\WC_Restaurant_Ordering\MenuMenu_Product

Handles the display of an individual product in a restaurant menu.

Summary

Methods
Properties
Constants
__construct()
get_product()
get_description()
get_image()
get_image_url()
get_name()
get_price()
get_order_type()
No public properties found
No constants found
get_image_size()
get_template_args()
$product
$options
N/A
No private methods found
$template_loader
$image_url
N/A

Properties

$product

$product : \WC_Product

Type

\WC_Product — The product for this menu item.

$image_url

$image_url : string

Type

string — The URL of the product image used in the menu (set on demand).

Methods

get_product()

get_product() 

get_description()

get_description() 

get_image()

get_image() 

get_image_url()

get_image_url() 

get_name()

get_name() 

get_price()

get_price() 

get_order_type()

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.

Returns

string —

The supported order type (quick, check or modal)

get_image_size()

get_image_size() 

get_template_args()

get_template_args(\WC_Product  $product) 

Parameters

\WC_Product $product