Frontend_Templates implements Service, Registerable, Conditional

Loads the various scripts and styles needed for the cart modal

Tags
author

Barn2 Plugins [email protected]

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Service
Marker interface to denote a service.
Registerable
An object that can be registered with WordPress via the Plugin API, i.e. add_action() and add_filter().
Conditional
An object which is loaded conditionally.

Table of Contents

$settings  : mixed
$version  : mixed
__construct()  : mixed
Constructor
add_cart_close_wrapper()  : void
Closing tag for cart template.
add_cart_open_wrapper()  : void
Outputs opening tag for cart template controlled by Fast Cart.
add_wfc_flag_to_redirect()  : string
Adds wfc-cart to GET request parameters of woocommerce cart redirection url when parameter is present in request headers
cart_classes()  : array<string|int, mixed>
Adds classes to Fast Cart wrapper to hide unavailable features of Fast Cart
close_cart_actions_wrapper()  : void
Outputs closing tag for cart actions DOM
close_checkout_wrapper()  : void
Closes div wrapper on wfc checkout template
is_required()  : bool
Tests to see if templates need to be loaded at all
maybe_change_totals_template()  : string
DEPRECATED replaces cart totals template with fast cart version
maybe_get_cart_template()  : mixed
Overrides default WC cart template when 'wfc-cart' is present GET request parameters hooks into `template_include` filter
maybe_get_checkout_template()  : string
Overrides default WC checkout template when 'wfc-checkout' is present GET request parameters hooks into `template_include` filter
open_cart_actions_wrapper()  : void
Outputs opening tag for cart actions DOM
open_checkout_wrapper()  : void
Adds div wrapper to wfc checkout template
prepare_fast_cart()  : void
Sets up actions for display of Fast Cart template functions
register()  : void
Adds Fast Cart templates to WordPress and WooCommerce actions and filters
remove_cart_functions()  : void
DEPRECATED. disables various cart functions on Fast Cart according to settings
show_fast_cart_button()  : mixed
Outputs fast cart button on page
wfc_cart_totals()  : void
Cart totals template
wfc_checkout_buttons()  : void
Outputs cart checkout buttons
wfc_coupons()  : void
Outputs coupon code html
wfc_cross_sells()  : void
Outputs cross sells carousel
wfc_show_product()  : void
Outputs product within cross sells carousel
wfc_template_loop_rating()  : void
Outputs product star ratings

Properties

Methods

__construct()

Constructor

public __construct(string $version) : mixed
Parameters
$version : string

Plugin version

Return values
mixed

add_cart_close_wrapper()

Closing tag for cart template.

public add_cart_close_wrapper() : void
Return values
void

add_cart_open_wrapper()

Outputs opening tag for cart template controlled by Fast Cart.

public add_cart_open_wrapper() : void
Return values
void

add_wfc_flag_to_redirect()

Adds wfc-cart to GET request parameters of woocommerce cart redirection url when parameter is present in request headers

public add_wfc_flag_to_redirect(string $url) : string
Parameters
$url : string

url to redirect after cart action

Tags
since

v0.1

Return values
string

cart_classes()

Adds classes to Fast Cart wrapper to hide unavailable features of Fast Cart

public cart_classes(array<string|int, mixed> $classes) : array<string|int, mixed>
Parameters
$classes : array<string|int, mixed>

original wfc wrapper classes

Tags
since

v0.1

Return values
array<string|int, mixed>

close_cart_actions_wrapper()

Outputs closing tag for cart actions DOM

public static close_cart_actions_wrapper() : void
Return values
void

close_checkout_wrapper()

Closes div wrapper on wfc checkout template

public static close_checkout_wrapper() : void
Tags
since

v0.1

Return values
void

is_required()

Tests to see if templates need to be loaded at all

public is_required() : bool
Return values
bool

maybe_change_totals_template()

DEPRECATED replaces cart totals template with fast cart version

public maybe_change_totals_template(string $template, string $template_name) : string
Parameters
$template : string

original template path

$template_name : string

name of template

Tags
since

v0.1

Return values
string

new template path

maybe_get_cart_template()

Overrides default WC cart template when 'wfc-cart' is present GET request parameters hooks into `template_include` filter

public maybe_get_cart_template(mixed $template) : mixed
Parameters
$template : mixed

original template from WC

Tags
since

v0.1

Return values
mixed

maybe_get_checkout_template()

Overrides default WC checkout template when 'wfc-checkout' is present GET request parameters hooks into `template_include` filter

public maybe_get_checkout_template(string $template) : string
Parameters
$template : string

original template from WC

Tags
since

v0.1

Return values
string

open_cart_actions_wrapper()

Outputs opening tag for cart actions DOM

public static open_cart_actions_wrapper() : void
Return values
void

open_checkout_wrapper()

Adds div wrapper to wfc checkout template

public static open_checkout_wrapper() : void
Tags
since

v0.1

Return values
void

prepare_fast_cart()

Sets up actions for display of Fast Cart template functions

public prepare_fast_cart() : void
Tags
since

v0.1

Return values
void

register()

Adds Fast Cart templates to WordPress and WooCommerce actions and filters

public register() : void
Return values
void

remove_cart_functions()

DEPRECATED. disables various cart functions on Fast Cart according to settings

public remove_cart_functions() : void
Tags
since

v0.1

Return values
void

show_fast_cart_button()

Outputs fast cart button on page

public show_fast_cart_button() : mixed
Tags
since

v0.1

Return values
mixed

wfc_cart_totals()

Cart totals template

public wfc_cart_totals() : void
Tags
since

v0.1

Return values
void

wfc_checkout_buttons()

Outputs cart checkout buttons

public wfc_checkout_buttons() : void
Tags
since

v0.1

Return values
void

wfc_coupons()

Outputs coupon code html

public wfc_coupons() : void
Tags
since

v0.1

Return values
void

wfc_cross_sells()

Outputs cross sells carousel

public wfc_cross_sells() : void
Tags
since

v0.1

Return values
void

wfc_show_product()

Outputs product within cross sells carousel

public wfc_show_product(WP_Post $post) : void
Parameters
$post : WP_Post

WP_Post or WC_Product object

Tags
since

v0.1

Return values
void

wfc_template_loop_rating()

Outputs product star ratings

public wfc_template_loop_rating() : void
Tags
since

v0.1

Return values
void

Search results