WC_Stripe_Customer_Manager
in package

Class that manages customer creation and custom updates.

Tags
since
3.0.0
author

PaymentPlugins

Table of Contents

Properties

$_instance  : mixed

Methods

__construct()  : mixed
checkout_update_customer()  : mixed
create_customer()  : Customer|WP_Error
handle_before_process_payment()  : void
instance()  : mixed
should_create_when_account_exists()  : bool
Returns true if the plugin should create a Stripe customer if the user has an account with the store
should_create_when_payment()  : bool
Returns true if the plugin should create a Stripe customer when the payment is being processed.
sync_payment_methods()  : mixed
Syncs the WC database payment methods with the payment methods stored in Stripe.
update_customer()  : mixed
wp_loaded()  : mixed
Check if the Stripe customer has been created for the WC user.
get_attribute_keys()  : array<string|int, mixed>
Returns an array of user attributes.
get_customer_args()  : array<string|int, mixed>
Return an array of args used to create or update a customer.
get_customer_args_from_order()  : mixed
get_customer_id_from_user_id()  : mixed
should_update_customer()  : bool
Returns true if the customer should be updated in Stripe.
user_has_id()  : mixed

Properties

Methods

checkout_update_customer()

public checkout_update_customer(WC_Customer $customer, array<string|int, mixed> $data) : mixed
Parameters
$customer : WC_Customer
$data : array<string|int, mixed>

create_customer()

public create_customer(WC_Customer $customer[, mixed $mode = null ]) : Customer|WP_Error
Parameters
$customer : WC_Customer
$mode : mixed = null
Return values
Customer|WP_Error

should_create_when_account_exists()

Returns true if the plugin should create a Stripe customer if the user has an account with the store

public should_create_when_account_exists() : bool
Tags
since
3.3.38
Return values
bool

should_create_when_payment()

Returns true if the plugin should create a Stripe customer when the payment is being processed.

public should_create_when_payment() : bool
Tags
since
3.3.38
Return values
bool

sync_payment_methods()

Syncs the WC database payment methods with the payment methods stored in Stripe.

public static sync_payment_methods(string $customer_id, int $user_id[, mixed $mode = '' ]) : mixed
Parameters
$customer_id : string
$user_id : int
$mode : mixed = ''
Tags
since
3.1.0

get_customer_args()

Return an array of args used to create or update a customer.

private get_customer_args(WC_Customer $customer[, string $context = 'create' ]) : array<string|int, mixed>
Parameters
$customer : WC_Customer
$context : string = 'create'
Tags
since
3.2.12
Return values
array<string|int, mixed>

should_update_customer()

Returns true if the customer should be updated in Stripe.

private should_update_customer(WC_Customer $customer) : bool
Parameters
$customer : WC_Customer
Return values
bool

        
On this page

Search results