PHP 클래스 WC_Payment_Token_Data_Store

저자: WooThemes
상속: extends WC_Data_Store_WP, implements WC_Payment_Token_Data_Store_Interface, implements WC_Object_Data_Store_Interface
파일 보기 프로젝트 열기: woocommerce/woocommerce

보호된 프로퍼티들

프로퍼티 타입 설명
$meta_type string Meta type. Payment tokens are a new object type.

공개 메소드들

메소드 설명
create ( WC_Payment_Token &$token ) Create a new payment token in the database.
delete ( WC_Payment_Token &$token, boolean $force_delete = false ) Remove a payment token from the database.
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.
read ( WC_Payment_Token &$token ) Read a token from the database.
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.
update ( WC_Payment_Token &$token ) Update a payment token.

메소드 상세

create() 공개 메소드

Create a new payment token in the database.
부터: 2.7.0
public create ( WC_Payment_Token &$token )
$token WC_Payment_Token

delete() 공개 메소드

Remove a payment token from the database.
부터: 2.7.0
public delete ( WC_Payment_Token &$token, boolean $force_delete = false )
$token WC_Payment_Token
$force_delete boolean

get_metadata() 공개 메소드

Returns metadata for a specific payment token.
부터: 2.7.0
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.
부터: 2.7.0
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.
부터: 2.7.0
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.
부터: 2.7.0
public get_users_default_token ( id $user_id ) : object
$user_id id
리턴 object

read() 공개 메소드

Read a token from the database.
부터: 2.7.0
public read ( WC_Payment_Token &$token )
$token WC_Payment_Token

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.
부터: 2.7.0
public set_default_status ( id $token_id, $status = true ) : string
$token_id id
리턴 string

update() 공개 메소드

Update a payment token.
부터: 2.7.0
public update ( WC_Payment_Token &$token )
$token WC_Payment_Token

프로퍼티 상세

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

Meta type. Payment tokens are a new object type.
protected string $meta_type
리턴 string