PHP 클래스 WC_Shipping_Legacy_Flat_Rate

This class is here for backwards commpatility for methods existing before zones existed.
사용 중단: 2.6.0
저자: WooThemes
상속: extends WC_Shipping_Method
파일 보기 프로젝트 열기: woocommerce/woocommerce 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$fee_cost cost passed to [fee] shortcode

공개 메소드들

메소드 설명
__construct ( ) Constructor.
calc_percentage_adjustment ( float $cost, float $percent_adjustment, string $percent_operator, float $base_price ) : float Calculate the percentage adjustment for each shipping rate.
calculate_extra_shipping ( $method, $rate ) Adds extra calculated flat rates.
calculate_shipping ( array $package = [] ) calculate_shipping function.
fee ( array $atts ) : string Work out fee (shortcode).
find_shipping_classes ( mixed $package ) : array Finds and returns shipping classes and the products with said class.
get_extra_cost ( string $cost_string, string $type, array $package ) : float Get extra cost.
get_option_key ( ) : string Return the name of the option in the WP DB.
get_package_item_qty ( array $package ) : integer Get items in package.
init ( ) init function.
init_form_fields ( ) Initialise Settings Form Fields.
process_admin_options ( ) Process and redirect if disabled.

보호된 메소드들

메소드 설명
evaluate_cost ( string $sum, array $args = [] ) : string Evaluate a cost from a sum/string.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( )

calc_percentage_adjustment() 공개 메소드

Calculate the percentage adjustment for each shipping rate.
사용 중단: 2.4.0
public calc_percentage_adjustment ( float $cost, float $percent_adjustment, string $percent_operator, float $base_price ) : float
$cost float
$percent_adjustment float
$percent_operator string
$base_price float
리턴 float

calculate_extra_shipping() 공개 메소드

Adds extra calculated flat rates.
사용 중단: 2.4.0 Additonal rates defined like this: Option Name | Additional Cost [+- Percents%] | Per Cost Type (order, class, or item).
public calculate_extra_shipping ( $method, $rate )

calculate_shipping() 공개 메소드

calculate_shipping function.
public calculate_shipping ( array $package = [] )
$package array (default: array())

evaluate_cost() 보호된 메소드

Evaluate a cost from a sum/string.
protected evaluate_cost ( string $sum, array $args = [] ) : string
$sum string
$args array
리턴 string

fee() 공개 메소드

Work out fee (shortcode).
public fee ( array $atts ) : string
$atts array
리턴 string

find_shipping_classes() 공개 메소드

Finds and returns shipping classes and the products with said class.
public find_shipping_classes ( mixed $package ) : array
$package mixed
리턴 array

get_extra_cost() 공개 메소드

Get extra cost.
사용 중단: 2.4.0
public get_extra_cost ( string $cost_string, string $type, array $package ) : float
$cost_string string
$type string
$package array
리턴 float

get_option_key() 공개 메소드

Return the name of the option in the WP DB.
부터: 2.6.0
public get_option_key ( ) : string
리턴 string

get_package_item_qty() 공개 메소드

Get items in package.
public get_package_item_qty ( array $package ) : integer
$package array
리턴 integer

init() 공개 메소드

init function.
public init ( )

init_form_fields() 공개 메소드

Initialise Settings Form Fields.
public init_form_fields ( )

process_admin_options() 공개 메소드

Process and redirect if disabled.

프로퍼티 상세

$fee_cost 보호되어 있는 프로퍼티

cost passed to [fee] shortcode
protected $fee_cost