EDD_Recurring implements Registerable
Handles integration with the EDD Recurring plugin.
Tags
Interfaces, Classes and Traits
- Registerable
Table of Contents
- insert_subscription_payment() : mixed
- Add VAT details to EDD subscription payment.
- maybe_add_vat_flag_to_purchase_data() : mixed
- When VAT is applied to the parent order, mark it on cart items so VAT can be removed from recurring subscriptions.
- register() : mixed
- {@inheritdoc}
- update_recurring_subscription_amounts() : mixed
- Update subscription amounts to remove VAT if applicable.
Methods
insert_subscription_payment()
Add VAT details to EDD subscription payment.
public
insert_subscription_payment(EDD_Payment $payment, EDD_Subscription $subscription) : mixed
Parameters
- $payment : EDD_Payment
- $subscription : EDD_Subscription
Return values
mixed —maybe_add_vat_flag_to_purchase_data()
When VAT is applied to the parent order, mark it on cart items so VAT can be removed from recurring subscriptions.
public
maybe_add_vat_flag_to_purchase_data(array<string|int, mixed> $purchase_data) : mixed
Filter for edd_recurring_purchase_data
Parameters
- $purchase_data : array<string|int, mixed>
-
the entire EDD checkout session, should already be populated with a payment key
Return values
mixed —register()
{@inheritdoc}
public
register() : mixed
Return values
mixed —update_recurring_subscription_amounts()
Update subscription amounts to remove VAT if applicable.
public
update_recurring_subscription_amounts(array<string|int, mixed> $recurring_amounts, array<string|int, mixed> $item, int $key, array<string|int, mixed> $cart_details, array<string|int, mixed> $cart_discounts) : mixed
Filter for edd_recurring_subscription_recurring_amounts
Parameters
- $recurring_amounts : array<string|int, mixed>
-
the values of the recurring payment being returned
- $item : array<string|int, mixed>
-
the cart item being setup as a recurring payment
- $key : int
-
the cart item key
- $cart_details : array<string|int, mixed>
-
the cart details
- $cart_discounts : array<string|int, mixed>
-
the cart discounts