PHP 클래스 WC_Connect_Service_Settings_Store, woocommerce-connect-client

파일 보기 프로젝트 열기: Automattic/woocommerce-connect-client 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$api_client WC_Connect_API_Client
$logger WC_Connect_Logger
$service_schemas_store WC_Connect_Service_Schemas_Store

공개 메소드들

메소드 설명
__construct ( WC_Connect_Service_Schemas_Store $service_schemas_store, WC_Connect_API_Client $api_client, WC_Connect_Logger $logger )
get_account_settings ( ) : array Gets connect account settings (e.g. payment method)
get_enabled_services ( ) : array Returns the service type and id for each enabled Connect for WooCommerce service
get_origin_address ( )
get_package_lookup_for_service ( $service_id )
get_packages ( ) : array Returns a global list of packages
get_predefined_packages ( ) : array Returns a global list of enabled predefined packages for all services
get_predefined_packages_for_service ( $service_id ) : array Returns a list of enabled predefined packages for the specified service
get_preferred_paper_size ( )
get_selected_payment_method_id ( )
get_service_failure_timestamp_key ( string $service_id, integer $service_instance = false ) : string Based on the service id and optional instance, generates the options key that should be used to get/set the service's last failure timestamp
get_service_settings ( string $service_id, integer $service_instance = false ) : object | array Given a service's id and optional instance, returns the settings for that service or an empty array
get_store_options ( ) : object | array Gets woocommerce store options that are useful for all connect services
set_preferred_paper_size ( $size )
set_selected_payment_method_id ( $new_payment_method_id )
update_account_settings ( array $settings ) : true Updates connect account settings (e.g. payment method)
update_label_order_meta_data ( $order_id, $new_label_data )
update_origin_address ( $address )
update_packages ( $packages ) Updates the global list of packages
update_predefined_packages ( $packages ) Updates the global list of enabled predefined packages for all services
validate_and_possibly_update_settings ( $settings, $id, $instance = false ) : boolean | WP_Error Given id and possibly instance, validates the settings and, if they validate, saves them to options

보호된 메소드들

메소드 설명
get_service_settings_key ( string $service_id, integer $service_instance = false ) : string Based on the service id and optional instance, generates the options key that should be used to get/set the service's settings
sort_services ( $a, $b )

비공개 메소드들

메소드 설명
translate_unit ( $value )

메소드 상세

__construct() 공개 메소드

public __construct ( WC_Connect_Service_Schemas_Store $service_schemas_store, WC_Connect_API_Client $api_client, WC_Connect_Logger $logger )
$service_schemas_store WC_Connect_Service_Schemas_Store
$api_client WC_Connect_API_Client
$logger WC_Connect_Logger

get_account_settings() 공개 메소드

Gets connect account settings (e.g. payment method)
public get_account_settings ( ) : array
리턴 array

get_enabled_services() 공개 메소드

Shipping services also include instance_id and shipping zone id Note that at this time, only shipping services exist, but this method will return other services in the future
public get_enabled_services ( ) : array
리턴 array

get_origin_address() 공개 메소드

public get_origin_address ( )

get_package_lookup_for_service() 공개 메소드

public get_package_lookup_for_service ( $service_id )

get_packages() 공개 메소드

Returns a global list of packages
public get_packages ( ) : array
리턴 array

get_predefined_packages() 공개 메소드

Returns a global list of enabled predefined packages for all services
public get_predefined_packages ( ) : array
리턴 array

get_predefined_packages_for_service() 공개 메소드

Returns a list of enabled predefined packages for the specified service
public get_predefined_packages_for_service ( $service_id ) : array
$service_id
리턴 array

get_preferred_paper_size() 공개 메소드

get_selected_payment_method_id() 공개 메소드

get_service_failure_timestamp_key() 공개 메소드

Based on the service id and optional instance, generates the options key that should be used to get/set the service's last failure timestamp
public get_service_failure_timestamp_key ( string $service_id, integer $service_instance = false ) : string
$service_id string
$service_instance integer
리턴 string

get_service_settings() 공개 메소드

Given a service's id and optional instance, returns the settings for that service or an empty array
public get_service_settings ( string $service_id, integer $service_instance = false ) : object | array
$service_id string
$service_instance integer
리턴 object | array

get_service_settings_key() 보호된 메소드

Based on the service id and optional instance, generates the options key that should be used to get/set the service's settings
protected get_service_settings_key ( string $service_id, integer $service_instance = false ) : string
$service_id string
$service_instance integer
리턴 string

get_store_options() 공개 메소드

Gets woocommerce store options that are useful for all connect services
public get_store_options ( ) : object | array
리턴 object | array

set_preferred_paper_size() 공개 메소드

public set_preferred_paper_size ( $size )

set_selected_payment_method_id() 공개 메소드

public set_selected_payment_method_id ( $new_payment_method_id )

sort_services() 보호된 메소드

protected sort_services ( $a, $b )

update_account_settings() 공개 메소드

Updates connect account settings (e.g. payment method)
public update_account_settings ( array $settings ) : true
$settings array
리턴 true

update_label_order_meta_data() 공개 메소드

public update_label_order_meta_data ( $order_id, $new_label_data )

update_origin_address() 공개 메소드

public update_origin_address ( $address )

update_packages() 공개 메소드

Updates the global list of packages
public update_packages ( $packages )

update_predefined_packages() 공개 메소드

Updates the global list of enabled predefined packages for all services
public update_predefined_packages ( $packages )

validate_and_possibly_update_settings() 공개 메소드

Given id and possibly instance, validates the settings and, if they validate, saves them to options
public validate_and_possibly_update_settings ( $settings, $id, $instance = false ) : boolean | WP_Error
리턴 boolean | WP_Error

프로퍼티 상세

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

protected WC_Connect_API_Client $api_client
리턴 WC_Connect_API_Client

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

protected WC_Connect_Logger $logger
리턴 WC_Connect_Logger

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

protected WC_Connect_Service_Schemas_Store $service_schemas_store
리턴 WC_Connect_Service_Schemas_Store