Override implements Standard_Service, Registerable

Class Override Handles template overriding for WooCommerce Filters plugin.

Tags
codeCoverageIgnore
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Standard_Service
Registerable

Table of Contents

dequeue_wcf_assets()  : void
Dequeue WCF frontend assets when components are not active.
disable_default_woocommerce_loop()  : void
Disable the default WooCommerce loop.
modify_shortcode_output()  : string
Modify the shortcode output.
register()  : void
Register the service.
render_wcf_elements()  : void
Render the WCF elements.
template_shop_override()  : void
Override the shop template if necessary.
has_wcf_components()  : bool
Check if WCF components (widget or shortcodes) are active.
has_wcf_shortcodes()  : bool
Check if WCF shortcodes are being used in various contexts.
is_product_attribute_taxonomy()  : bool
Check if the given taxonomy is a product attribute.
should_override()  : bool
Determine if the template should be overridden.

Methods

dequeue_wcf_assets()

Dequeue WCF frontend assets when components are not active.

public static dequeue_wcf_assets() : void
Return values
void

disable_default_woocommerce_loop()

Disable the default WooCommerce loop.

public static disable_default_woocommerce_loop() : void
Return values
void

modify_shortcode_output()

Modify the shortcode output.

public static modify_shortcode_output(string $output, string $tag, array<string|int, mixed> $attributes) : string
Parameters
$output : string

The output.

$tag : string

The shortcode tag.

$attributes : array<string|int, mixed>

The shortcode attributes.

Return values
string

Modified output.

register()

Register the service.

public register() : void
Return values
void

render_wcf_elements()

Render the WCF elements.

public static render_wcf_elements() : void
Return values
void

template_shop_override()

Override the shop template if necessary.

public static template_shop_override() : void
Return values
void

has_wcf_components()

Check if WCF components (widget or shortcodes) are active.

private static has_wcf_components() : bool
Return values
bool

Whether WCF components are active.

has_wcf_shortcodes()

Check if WCF shortcodes are being used in various contexts.

private static has_wcf_shortcodes() : bool
Return values
bool

Whether WCF shortcodes are found.

is_product_attribute_taxonomy()

Check if the given taxonomy is a product attribute.

private static is_product_attribute_taxonomy(string $taxonomy) : bool
Parameters
$taxonomy : string

The taxonomy to check.

Return values
bool

Whether the taxonomy is a product attribute.

should_override()

Determine if the template should be overridden.

private static should_override() : bool
Return values
bool

Whether the template should be overridden.

Search results