PHP Класс WC_Shipping_Free_Shipping

A simple shipping method for free shipping.
Автор: WooThemes
Наследование: extends WC_Shipping_Method
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$min_amount integer Min amount to be valid.
$requires string Requires option.

Открытые методы

Метод Описание
__construct ( integer $instance_id ) Constructor.
calculate_shipping ( array $package = [] ) Called to calculate shipping rates for this method. Rates can be added using the add_rate() method.
get_instance_form_fields ( ) : array Get setting form fields for instances of this shipping method within zones.
init ( ) Initialize free shipping.
init_form_fields ( ) Init form fields.
is_available ( array $package ) : boolean See if free shipping is available based on the package and cart.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( integer $instance_id )
$instance_id integer Shipping method instance.

calculate_shipping() публичный Метод

Called to calculate shipping rates for this method. Rates can be added using the add_rate() method.
public calculate_shipping ( array $package = [] )
$package array Shipping package.

get_instance_form_fields() публичный Метод

Get setting form fields for instances of this shipping method within zones.
public get_instance_form_fields ( ) : array
Результат array

init() публичный Метод

Initialize free shipping.
public init ( )

init_form_fields() публичный Метод

Init form fields.
public init_form_fields ( )

is_available() публичный Метод

See if free shipping is available based on the package and cart.
public is_available ( array $package ) : boolean
$package array Shipping package.
Результат boolean

Описание свойств

$min_amount публичное свойство

Min amount to be valid.
public int $min_amount
Результат integer

$requires публичное свойство

Requires option.
public string $requires
Результат string