eeco_logo_svg Created with Sketch.

WooCommerce Smartum Gateway

WC_Smartum_Gateway extends WC_Payment_Gateway
in package

Table of Contents

$invalid_venue_notice_shown  : mixed
Prevent showing admin notice about invalid venue twice
$benefit  : mixed
the benefit type of products in cart cannot be null after availability check
__construct()  : mixed
constructing binding a few actions and adding gateway defaults
add_fee()  : mixed
add fee to cart if necessary
check_connection()  : array<string|int, mixed>
Check smartum connection and if the venue id is valid Saves valid product types to be used in cart validation
check_for_valid_items()  : bool
Checks whether given cart/order item is valid for smartum checkout
init_form_fields()  : mixed
create the admin form settings fields
is_available()  : bool
checks whether the smartum gateway is enabled for the given cart
is_settings_page()  : bool
Check if currently on smartum settings page
notices()  : mixed
Print admin notices if saving the venue fails
process_payment()  : array<string|int, mixed>
processing the payment if using smartum gateway

Properties

$invalid_venue_notice_shown

Prevent showing admin notice about invalid venue twice

public static mixed $invalid_venue_notice_shown = alse

$benefit

the benefit type of products in cart cannot be null after availability check

private mixed $benefit = ull

Methods

__construct()

constructing binding a few actions and adding gateway defaults

public __construct() : mixed
Return values
mixed

add_fee()

add fee to cart if necessary

public add_fee(WC_Cart $cart) : mixed
Parameters
$cart : WC_Cart

The cart object

Return values
mixed

check_connection()

Check smartum connection and if the venue id is valid Saves valid product types to be used in cart validation

public check_connection(array<string|int, mixed> $settings) : array<string|int, mixed>
Parameters
$settings : array<string|int, mixed>

The settings

Return values
array<string|int, mixed>

Settings

check_for_valid_items()

Checks whether given cart/order item is valid for smartum checkout

public check_for_valid_items(string $type) : bool
Parameters
$type : string

The benefit type

Return values
bool

Whether valid or not

init_form_fields()

create the admin form settings fields

public init_form_fields() : mixed
Return values
mixed

is_available()

checks whether the smartum gateway is enabled for the given cart

public is_available() : bool
Return values
bool

Whether gateway is available for this cart

is_settings_page()

Check if currently on smartum settings page

public is_settings_page() : bool
Return values
bool

Is settings page

notices()

Print admin notices if saving the venue fails

public notices() : mixed
Return values
mixed

process_payment()

processing the payment if using smartum gateway

public process_payment(int $order_id) : array<string|int, mixed>
Parameters
$order_id : int

The order id

Return values
array<string|int, mixed>

The result with checkout url


        

Search results