Use PHP 7.4 featers and PHP 8 polyfills
This commit is contained in:
@ -20,162 +20,162 @@ use WP_Ultimo\Database\Memberships\Membership_Status;
|
||||
*
|
||||
* @since 2.0.11
|
||||
*/
|
||||
return array(
|
||||
'customer_id' => array(
|
||||
return [
|
||||
'customer_id' => [
|
||||
'description' => __('The ID of the customer attached to this membership.', 'wp-ultimo'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
),
|
||||
'user_id' => array(
|
||||
],
|
||||
'user_id' => [
|
||||
'description' => __('The user ID attached to this membership.', 'wp-ultimo'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
),
|
||||
'plan_id' => array(
|
||||
],
|
||||
'plan_id' => [
|
||||
'description' => __('The plan ID associated with the membership.', 'wp-ultimo'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
),
|
||||
'addon_products' => array(
|
||||
],
|
||||
'addon_products' => [
|
||||
'description' => __('Additional products related to this membership. Services, Packages or other types of products.', 'wp-ultimo'),
|
||||
'type' => 'mixed',
|
||||
'required' => false,
|
||||
),
|
||||
'currency' => array(
|
||||
],
|
||||
'currency' => [
|
||||
'description' => __("The currency that this membership. It's a 3-letter code. E.g. 'USD'.", 'wp-ultimo'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
),
|
||||
'duration' => array(
|
||||
],
|
||||
'duration' => [
|
||||
'description' => __('The interval period between a charge. Only the interval amount, the unit will be defined in another property.', 'wp-ultimo'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
),
|
||||
'duration_unit' => array(
|
||||
],
|
||||
'duration_unit' => [
|
||||
'description' => __("The duration amount type. Can be 'day', 'week', 'month' or 'year'.", 'wp-ultimo'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => array(
|
||||
'enum' => [
|
||||
'day',
|
||||
'month',
|
||||
'week',
|
||||
'year',
|
||||
),
|
||||
),
|
||||
'amount' => array(
|
||||
],
|
||||
],
|
||||
'amount' => [
|
||||
'description' => __('The product amount.', 'wp-ultimo'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
),
|
||||
'initial_amount' => array(
|
||||
],
|
||||
'initial_amount' => [
|
||||
'description' => __('The initial amount charged for this membership, including the setup fee.', 'wp-ultimo'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
),
|
||||
'date_created' => array(
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Date of creation of this membership.', 'wp-ultimo'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
),
|
||||
'date_activated' => array(
|
||||
],
|
||||
'date_activated' => [
|
||||
'description' => __('Date when this membership was activated.', 'wp-ultimo'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
),
|
||||
'date_trial_end' => array(
|
||||
],
|
||||
'date_trial_end' => [
|
||||
'description' => __('Date when the trial period ends, if this membership has or had a trial period.', 'wp-ultimo'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
),
|
||||
'date_renewed' => array(
|
||||
],
|
||||
'date_renewed' => [
|
||||
'description' => __('Date when the membership was cancelled.', 'wp-ultimo'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
),
|
||||
'date_cancellation' => array(
|
||||
],
|
||||
'date_cancellation' => [
|
||||
'description' => __('Date when the membership was cancelled.', 'wp-ultimo'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
),
|
||||
'date_expiration' => array(
|
||||
],
|
||||
'date_expiration' => [
|
||||
'description' => __('Date when the membership will expiry.', 'wp-ultimo'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
),
|
||||
'date_payment_plan_completed' => array(
|
||||
],
|
||||
'date_payment_plan_completed' => [
|
||||
'description' => __('Change of the payment completion for the plan value.', 'wp-ultimo'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
),
|
||||
'auto_renew' => array(
|
||||
],
|
||||
'auto_renew' => [
|
||||
'description' => __('If this membership should auto-renewal.', 'wp-ultimo'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
),
|
||||
'times_billed' => array(
|
||||
],
|
||||
'times_billed' => [
|
||||
'description' => __('Amount of times this membership got billed.', 'wp-ultimo'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
),
|
||||
'billing_cycles' => array(
|
||||
],
|
||||
'billing_cycles' => [
|
||||
'description' => __('Maximum times we should charge this membership.', 'wp-ultimo'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
),
|
||||
'status' => array(
|
||||
],
|
||||
'status' => [
|
||||
'description' => __("The membership status. Can be 'pending', 'active', 'on-hold', 'expired', 'cancelled' or other values added by third-party add-ons.", 'wp-ultimo'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => Membership_Status::get_allowed_list(),
|
||||
),
|
||||
'gateway_customer_id' => array(
|
||||
],
|
||||
'gateway_customer_id' => [
|
||||
'description' => __('The ID of the customer on the payment gateway database.', 'wp-ultimo'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
),
|
||||
'gateway_subscription_id' => array(
|
||||
],
|
||||
'gateway_subscription_id' => [
|
||||
'description' => __('The ID of the subscription on the payment gateway database.', 'wp-ultimo'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
),
|
||||
'gateway' => array(
|
||||
],
|
||||
'gateway' => [
|
||||
'description' => __('ID of the gateway being used on this subscription.', 'wp-ultimo'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
),
|
||||
'signup_method' => array(
|
||||
],
|
||||
'signup_method' => [
|
||||
'description' => __('Signup method used to create this membership.', 'wp-ultimo'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
),
|
||||
'upgraded_from' => array(
|
||||
],
|
||||
'upgraded_from' => [
|
||||
'description' => __('Plan that this membership upgraded from.', 'wp-ultimo'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
),
|
||||
'date_modified' => array(
|
||||
],
|
||||
'date_modified' => [
|
||||
'description' => __('Date this membership was last modified.', 'wp-ultimo'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
),
|
||||
'disabled' => array(
|
||||
],
|
||||
'disabled' => [
|
||||
'description' => __('If this membership is a disabled one.', 'wp-ultimo'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
),
|
||||
'recurring' => array(
|
||||
],
|
||||
'recurring' => [
|
||||
'description' => __('If this membership is recurring (true), which means the customer paid a defined amount each period of time, or not recurring (false).', 'wp-ultimo'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
),
|
||||
'migrated_from_id' => array(
|
||||
],
|
||||
'migrated_from_id' => [
|
||||
'description' => __('The ID of the original 1.X model that was used to generate this item on migration.', 'wp-ultimo'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
),
|
||||
'skip_validation' => array(
|
||||
],
|
||||
'skip_validation' => [
|
||||
'description' => __('Set true to have field information validation bypassed when saving this event.', 'wp-ultimo'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
),
|
||||
);
|
||||
],
|
||||
];
|
||||
|
Reference in New Issue
Block a user