PHP 인터페이스 WC_Payment_Token_Data_Store_Interface

Functions that must be defined by payment token store classes.
저자: WooThemes
파일 보기 프로젝트 열기: woocommerce/woocommerce

공개 메소드들

메소드 설명
get_metadata ( id $token_id ) : array Returns metadata for a specific payment token.
get_token_by_id ( id $token_id ) : object Returns an stdObject of a token.
get_token_type_by_id ( id $token_id ) : string Get a token's type by ID.
get_tokens ( array $args ) : array Returns an array of objects (stdObject) matching specific token critera.
get_users_default_token ( id $user_id ) : object Returns an stdObject of a token for a user's default token.
set_default_status ( id $token_id, $status = true ) : string Update's a tokens default status in the database. Used for quickly looping through tokens and setting their statuses instead of creating a bunch of objects.

메소드 상세

get_metadata() 공개 메소드

Returns metadata for a specific payment token.
public get_metadata ( id $token_id ) : array
$token_id id
리턴 array

get_token_by_id() 공개 메소드

Should contain the fields token_id, gateway_id, token, user_id, type, is_default.
public get_token_by_id ( id $token_id ) : object
$token_id id
리턴 object

get_token_type_by_id() 공개 메소드

Get a token's type by ID.
부터: 2.7.0
public get_token_type_by_id ( id $token_id ) : string
$token_id id
리턴 string

get_tokens() 공개 메소드

Accepts token_id, user_id, gateway_id, and type. Each object should contain the fields token_id, gateway_id, token, user_id, type, is_default.
public get_tokens ( array $args ) : array
$args array
리턴 array

get_users_default_token() 공개 메소드

Should contain the fields token_id, gateway_id, token, user_id, type, is_default.
public get_users_default_token ( id $user_id ) : object
$user_id id
리턴 object

set_default_status() 공개 메소드

Update's a tokens default status in the database. Used for quickly looping through tokens and setting their statuses instead of creating a bunch of objects.
public set_default_status ( id $token_id, $status = true ) : string
$token_id id
리턴 string