Restaurant_Ordering extends Plugin_Integration implements Registerable

Restaurant Ordering Plugin Integration.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Registerable

Table of Contents

$plugin_class  : string
The main plugin class to check for existence.
$plugin_function  : string
The main plugin function to check for existence.
add_closing_tag()  : void
Add closing div tag for the products loop.
add_opening_tag()  : void
Add opening div tag for the products loop.
add_reinitialize_script()  : void
Add inline script to reinitialize Restaurant Ordering components.
inspect_query()  : array<string|int, mixed>
Inspect the query to add a flag to the query.
override_products_args()  : array<string|int, mixed>
Override the products args to add a flag to the query.
override_products_loop()  : string
Override the products loop with the Restaurant Ordering menu.
plugin_is_enabled()  : bool
Check if the plugin is enabled.
register()  : void
Register the integration.

Properties

$plugin_class

The main plugin class to check for existence.

protected string $plugin_class = ''

$plugin_function

The main plugin function to check for existence.

protected string $plugin_function = '\\Barn2\\Plugin\\WC_Restaurant_Ordering\\wro'

Methods

add_closing_tag()

Add closing div tag for the products loop.

public add_closing_tag() : void
Return values
void

add_opening_tag()

Add opening div tag for the products loop.

public add_opening_tag() : void
Return values
void

add_reinitialize_script()

Add inline script to reinitialize Restaurant Ordering components.

public add_reinitialize_script() : void
Return values
void

inspect_query()

Inspect the query to add a flag to the query.

public inspect_query(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>

The arguments to pass to the query.

Return values
array<string|int, mixed>

The modified arguments.

override_products_args()

Override the products args to add a flag to the query.

public override_products_args(array<string|int, mixed> $args, array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>

The arguments to pass to the query.

$options : array<string|int, mixed>

The options for the query.

Return values
array<string|int, mixed>

The modified arguments.

override_products_loop()

Override the products loop with the Restaurant Ordering menu.

public override_products_loop(string $output, array<string|int, mixed> $products, Renderer $renderer) : string
Parameters
$output : string

The output to return (null to continue with default rendering)

$products : array<string|int, mixed>

Array of WC_Product objects

$renderer : Renderer

The current renderer instance

Return values
string

The modified output

plugin_is_enabled()

Check if the plugin is enabled.

public plugin_is_enabled() : bool
Return values
bool

register()

Register the integration.

public register() : void
Return values
void

Search results