Méthode | Description | |
---|---|---|
__construct ( ) | Constructor. | |
add_subscription_payment_meta ( array $payment_meta, WC_Subscription $subscription ) : array | Include the payment meta data required to process automatic recurring payments so that store managers can. | |
delete_resubscribe_meta ( integer $resubscribe_order ) : void | Don't transfer customer meta to resubscribe orders. | |
hosted_payment_args ( array $args, integer $order_id ) : array | Hosted payment args. | |
process_payment ( integer $order_id ) : array | Process the payment. | |
process_pre_order_release_payment ( WC_Order $order ) : WP_Error | null | Process a pre-order payment when the pre-order is released. | |
process_subscription_payment ( WC_order $order, integer $amount ) : boolean | WP_Error | process_subscription_payment function. | |
return_handler ( ) | Return handler for Hosted Payments. | |
scheduled_subscription_payment ( float $amount_to_charge, WC_Order $renewal_order ) | scheduled_subscription_payment function. | |
update_failing_payment_method ( WC_Subscription $subscription, WC_Order $renewal_order ) | Update the customer_id for a subscription after using Simplify to complete a payment to make up for. | |
validate_subscription_payment_meta ( string $payment_method_id, array $payment_meta ) : array | Validate the payment meta data required to process automatic recurring payments so that store managers can. |
Méthode | Description | |
---|---|---|
order_contains_pre_order ( integer $order_id ) : boolean | Check if order contains pre-orders. | |
order_contains_subscription ( integer $order_id ) : boolean | Check if order contains subscriptions. | |
process_pre_order ( WC_Order $order, string $cart_token = '' ) : array | Process the pre-order. | |
process_subscription ( WC_Order $order, string $cart_token = '' ) : array | Process the subscription. | |
save_subscription_meta ( integer $order_id, string $customer_id ) | Store the customer and card IDs on the order and subscriptions in the order. |
public add_subscription_payment_meta ( array $payment_meta, WC_Subscription $subscription ) : array | ||
$payment_meta | array | associative array of meta data required for automatic payments |
$subscription | WC_Subscription | An instance of a subscription object |
Résultat | array |
public delete_resubscribe_meta ( integer $resubscribe_order ) : void | ||
$resubscribe_order | integer | The order created for the customer to resubscribe to the old expired/cancelled subscription |
Résultat | void |
protected order_contains_pre_order ( integer $order_id ) : boolean | ||
$order_id | integer | |
Résultat | boolean |
protected order_contains_subscription ( integer $order_id ) : boolean | ||
$order_id | integer | |
Résultat | boolean |
public process_payment ( integer $order_id ) : array | ||
$order_id | integer | |
Résultat | array |
protected process_pre_order ( WC_Order $order, string $cart_token = '' ) : array | ||
$order | WC_Order | |
$cart_token | string | |
Résultat | array |
public process_pre_order_release_payment ( WC_Order $order ) : WP_Error | null | ||
$order | WC_Order | |
Résultat | WP_Error | null |
protected process_subscription ( WC_Order $order, string $cart_token = '' ) : array | ||
$order | WC_Order | |
$cart_token | string | |
Résultat | array |
public process_subscription_payment ( WC_order $order, integer $amount ) : boolean | WP_Error | ||
$order | WC_order | |
$amount | integer | (default: 0) |
Résultat | boolean | WP_Error |
protected save_subscription_meta ( integer $order_id, string $customer_id ) | ||
$order_id | integer | |
$customer_id | string |
public scheduled_subscription_payment ( float $amount_to_charge, WC_Order $renewal_order ) | ||
$amount_to_charge | float | The amount to charge. |
$renewal_order | WC_Order | A WC_Order object created to record the renewal payment. |
public update_failing_payment_method ( WC_Subscription $subscription, WC_Order $renewal_order ) | ||
$subscription | WC_Subscription | The subscription for which the failing payment method relates. |
$renewal_order | WC_Order | The order which recorded the successful payment (to make up for the failed automatic payment). |