Property | Type | Description | |
---|---|---|---|
$api_client | WC_Connect_API_Client | ||
$logger | WC_Connect_Logger | ||
$service_schema | A reference to a the fetched properties of the service | ||
$service_settings_store | WC_Connect_Service_Settings_Store |
Method | Description | |
---|---|---|
__construct ( $id_or_instance_id = null ) | ||
admin_options ( ) | ||
calculate_shipping ( $package = [] ) | ||
format_rate_id ( $method_id, $instance, $rate_idx ) | ||
format_rate_title ( $rate_title ) | ||
get_api_client ( ) | ||
get_logger ( ) | ||
get_service_schema ( ) | ||
get_service_settings ( ) : object | Returns the settings for this service (e.g. for use in the form or for sending to the rate request endpoint | |
get_service_settings_store ( ) | ||
is_valid_package_destination ( array $package ) : boolean | Determine if a package's destination is valid enough for a rate quote. | |
set_api_client ( WC_Connect_API_Client $api_client ) | ||
set_last_request_failed ( $timestamp = null ) | ||
set_logger ( WC_Connect_Logger $logger ) | ||
set_service_schema ( $service_schema ) | ||
set_service_settings_store ( $service_settings_store ) | ||
update_last_rate_request_timestamp ( ) |
Method | Description | |
---|---|---|
init_form_settings ( ) | Restores any values persisted to the DB for this service instance and sets up title for WC core to work properly | |
log ( string | WP_Error $message, string $context = '' ) | Logging helper. |
Method | Description | |
---|---|---|
lookup_product ( $package, $product_id ) |
public static format_rate_id ( $method_id, $instance, $rate_idx ) |
public get_service_settings ( ) : object | ||
return | object |
protected init_form_settings ( ) |
public is_valid_package_destination ( array $package ) : boolean | ||
$package | array | |
return | boolean |
public set_api_client ( WC_Connect_API_Client $api_client ) | ||
$api_client | WC_Connect_API_Client |
public set_logger ( WC_Connect_Logger $logger ) | ||
$logger | WC_Connect_Logger |
public set_service_settings_store ( $service_settings_store ) |
protected WC_Connect_API_Client $api_client | ||
return | WC_Connect_API_Client |
protected $service_schema |