Yith_Request_A_Quote implements Conditional, Registerable, Service

This class handles the integration with Yith Request A Quote.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Conditional
Registerable
Service

Table of Contents

$plugin  : mixed
$raq_content  : mixed
Content of session
$session_class  : mixed
Session object
__construct()  : mixed
add_button_single_page()  : mixed
Check if the button can be showed in single page
add_item()  : mixed
add_item_to_quote()  : mixed
custom_css()  : string
Button's custom CSS styles
exists()  : bool
Check if the product is in the list.
get_errors()  : string
Get all errors in HTML mode or simple string.
get_raq_for_session()  : array<string|int, mixed>
Get request quote list from session
init()  : mixed
Initialize functions
is_required()  : mixed
maybe_set_raq_cookies()  : void
Set Request a quote cookie.
register()  : mixed
set_session()  : void
Sets the php session data for the request a quote
show_button()  : bool
Filter the output of the button
start_session()  : mixed
Initialize session and cookies
set_rqa_cookies()  : void
Set hash cookie and items in raq.

Properties

Methods

add_button_single_page()

Check if the button can be showed in single page

public add_button_single_page() : mixed
Tags
since
2.3.3
Return values
mixed

add_item()

public add_item(mixed $data) : mixed
Parameters
$data : mixed
Return values
mixed

custom_css()

Button's custom CSS styles

public custom_css(mixed $css) : string
Parameters
$css : mixed
Return values
string

exists()

Check if the product is in the list.

public exists(int $product_id[, int|bool $variation_id = false ]) : bool
Parameters
$product_id : int

Product ID.

$variation_id : int|bool = false

Variation ID.

Return values
bool

get_errors()

Get all errors in HTML mode or simple string.

public get_errors(array<string|int, mixed> $errors[, bool $html = true ]) : string
Parameters
$errors : array<string|int, mixed>

Error list.

$html : bool = true

Content type.

Tags
since
1.0.0
Return values
string

get_raq_for_session()

Get request quote list from session

public get_raq_for_session() : array<string|int, mixed>
Tags
since
1.0.0
Return values
array<string|int, mixed>

init()

Initialize functions

public init() : mixed
Tags
since
1.0.0
Return values
mixed

maybe_set_raq_cookies()

Set Request a quote cookie.

public maybe_set_raq_cookies() : void
Tags
since
1.0.0
Return values
void

set_session()

Sets the php session data for the request a quote

public set_session([array<string|int, mixed> $raq_session = array() ][, bool $can_be_empty = false ]) : void
Parameters
$raq_session : array<string|int, mixed> = array()

Quote list session.

$can_be_empty : bool = false

Flag to check if the session can be empty.

Tags
since
1.0.0
Return values
void

show_button()

Filter the output of the button

public show_button(bool $condition) : bool
Parameters
$condition : bool
Tags
since
2.3.3
Return values
bool

$condition

start_session()

Initialize session and cookies

public start_session() : mixed
Tags
since
1.0.0
Return values
mixed

set_rqa_cookies()

Set hash cookie and items in raq.

private set_rqa_cookies([bool $set = true ]) : void
Parameters
$set : bool = true

Flag to check if a cookie must be set.

Tags
since
1.0.0
access

private

Return values
void

Search results