PHP 클래스 RCP_Member, restrict-content-pro

부터: 2.1
상속: extends WP_User
파일 보기 프로젝트 열기: restrictcontentpro/restrict-content-pro 1 사용 예제들

공개 메소드들

메소드 설명
add_note ( $note = '' ) Adds a new note to a member
calculate_expiration ( $force_now = false ) : String Calculates the new expiration date for a member
can_access ( $post_id ) Determines if the member can access current content
cancel ( ) Sets a member's membership as cancelled by updating status
get_card_details ( ) : string Get details about the member's card on file
get_expiration_date ( $formatted = true, $pending = true ) Retrieves the expiration date of the member
get_expiration_time ( ) Retrieves the expiration date of the member as a timestamp
get_joined_date ( $subscription_id ) : string Retrieves the joined date for a subscription
get_merchant_subscription_id ( ) Retrieves the subscription ID of the member from the merchant processor.
get_notes ( ) Retrieves the notes on a member
get_payment_profile_id ( ) Retrieves the profile ID of the member.
get_payments ( ) Retrieves all payments belonging to the member
get_pending_subscription_id ( ) Retrieves the pending subscription ID of the member
get_pending_subscription_key ( ) Retrieves the pending subscription key of the member
get_pending_subscription_name ( ) Retrieves the pending subscription name of the member
get_prorate_credit_amount ( ) : integer Get the prorate credit amount for the user's remaining subscription
get_renewed_date ( $subscription_id ) : string Retrieves the renewed date for a subscription
get_status ( ) Retrieves the status of the member
get_subscription_id ( ) Retrieves the subscription ID of the member
get_subscription_key ( ) Retrieves the subscription key of the member
get_subscription_name ( ) Retrieves the current subscription name of the member
get_switch_to_url ( ) Gets the URL to switch to the user if the User Switching plugin is active
has_trialed ( ) Determines if the member has used a trial
is_active ( ) Determines if a member has an active subscription, or is cancelled but has not reached EOT
is_expired ( ) Determines if the member is expired
is_recurring ( ) Determines if a member has a recurring subscription
is_trialing ( ) Determines if the member is currently trailing
just_upgraded ( ) : integer Determines if the customer just upgraded
renew ( $recurring = false, $status = 'active', $expiration = '' ) Renews a member's membership by updating status and expiration date
set_expiration_date ( $new_date = '' ) Sets the expiration date for a member
set_joined_date ( $date = '', $subscription_id ) Sets the joined date for a member
set_merchant_subscription_id ( $subscription_id = '' ) Sets the payment profile ID for a member
set_payment_profile_id ( $profile_id = '' ) Sets the payment profile ID for a member
set_recurring ( $yes = true ) Sets whether a member is recurring
set_renewed_date ( $date = '' ) Sets the renewed date for a member
set_status ( $new_status = '' ) Sets the status of a member

메소드 상세

add_note() 공개 메소드

Adds a new note to a member
부터: 2.1
public add_note ( $note = '' )

calculate_expiration() 공개 메소드

Calculates the new expiration date for a member
부터: 2.4
public calculate_expiration ( $force_now = false ) : String
리턴 String Date in Y-m-d H:i:s format or "none" if is a lifetime member

can_access() 공개 메소드

Determines if the member can access current content
부터: 2.1
public can_access ( $post_id )

cancel() 공개 메소드

Does NOT handle actual cancellation of subscription payments, that is done in rcp_process_member_cancellation(). This should be called after a member is successfully cancelled.
부터: 2.1
public cancel ( )

get_card_details() 공개 메소드

Get details about the member's card on file
부터: 2.5
public get_card_details ( ) : string
리턴 string

get_expiration_date() 공개 메소드

Retrieves the expiration date of the member
부터: 2.1
public get_expiration_date ( $formatted = true, $pending = true )

get_expiration_time() 공개 메소드

Retrieves the expiration date of the member as a timestamp
부터: 2.1
public get_expiration_time ( )

get_joined_date() 공개 메소드

Retrieves the joined date for a subscription
부터: 2.6
public get_joined_date ( $subscription_id ) : string
리턴 string Joined date

get_merchant_subscription_id() 공개 메소드

This is used by payment gateways to retrieve the ID of the subscription.
부터: 2.5

get_notes() 공개 메소드

Retrieves the notes on a member
부터: 2.1
public get_notes ( )

get_payment_profile_id() 공개 메소드

This is used by payment gateways to store customer IDs and other identifiers for payment profiles
부터: 2.1

get_payments() 공개 메소드

Retrieves all payments belonging to the member
부터: 2.1
public get_payments ( )

get_pending_subscription_id() 공개 메소드

Retrieves the pending subscription ID of the member
부터: 2.4.12

get_pending_subscription_key() 공개 메소드

Retrieves the pending subscription key of the member
부터: 2.4.12

get_pending_subscription_name() 공개 메소드

Retrieves the pending subscription name of the member
부터: 2.4.12

get_prorate_credit_amount() 공개 메소드

Get the prorate credit amount for the user's remaining subscription
부터: 2.5

get_renewed_date() 공개 메소드

Retrieves the renewed date for a subscription
부터: 2.6
public get_renewed_date ( $subscription_id ) : string
리턴 string Renewed date

get_status() 공개 메소드

Retrieves the status of the member
부터: 2.1
public get_status ( )

get_subscription_id() 공개 메소드

Retrieves the subscription ID of the member
부터: 2.1
public get_subscription_id ( )

get_subscription_key() 공개 메소드

Retrieves the subscription key of the member
부터: 2.1

get_subscription_name() 공개 메소드

Retrieves the current subscription name of the member
부터: 2.1

get_switch_to_url() 공개 메소드

Gets the URL to switch to the user if the User Switching plugin is active
부터: 2.1
public get_switch_to_url ( )

has_trialed() 공개 메소드

Determines if the member has used a trial
부터: 2.1
public has_trialed ( )

is_active() 공개 메소드

Determines if a member has an active subscription, or is cancelled but has not reached EOT
부터: 2.1
public is_active ( )

is_expired() 공개 메소드

Determines if the member is expired
부터: 2.1
public is_expired ( )

is_recurring() 공개 메소드

Determines if a member has a recurring subscription
부터: 2.1
public is_recurring ( )

is_trialing() 공개 메소드

Determines if the member is currently trailing
부터: 2.1
public is_trialing ( )

just_upgraded() 공개 메소드

Determines if the customer just upgraded
부터: 2.5
public just_upgraded ( ) : integer
리턴 integer - Timestamp reflecting the date/time of the latest upgrade

renew() 공개 메소드

Does NOT handle payment processing for the renewal. This should be called after receiving a renewal payment
부터: 2.1
public renew ( $recurring = false, $status = 'active', $expiration = '' )

set_expiration_date() 공개 메소드

Should be passed as a MYSQL date string.
부터: 2.1
public set_expiration_date ( $new_date = '' )

set_joined_date() 공개 메소드

Sets the joined date for a member
부터: 2.6
public set_joined_date ( $date = '', $subscription_id )

set_merchant_subscription_id() 공개 메소드

This is used by payment gateways to store the ID of the subscription.
부터: 2.5
public set_merchant_subscription_id ( $subscription_id = '' )

set_payment_profile_id() 공개 메소드

This is used by payment gateways to store customer IDs and other identifiers for payment profiles
부터: 2.1
public set_payment_profile_id ( $profile_id = '' )

set_recurring() 공개 메소드

Sets whether a member is recurring
부터: 2.1
public set_recurring ( $yes = true )

set_renewed_date() 공개 메소드

Sets the renewed date for a member
부터: 2.6
public set_renewed_date ( $date = '' )

set_status() 공개 메소드

Sets the status of a member
부터: 2.1
public set_status ( $new_status = '' )