Prep Plugin for release on WordPress.org (#23)
* Update translation text domain * Escape everything that should be escaped. * Add nonce checks where needed. * Sanitize all inputs. * Apply Code style changes across the codebase. * Correct many deprecation notices. * Optimize load order of many filters. * Add Proper Build script * Use emojii flags * Fix i18n deprecation notice for translating too early * Put all scripts in footer and load async
This commit is contained in:
@ -20,37 +20,37 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'name' => [
|
||||
'description' => __('Your discount code name, which is used as discount code title as well.', 'wp-ultimo'),
|
||||
'description' => __('Your discount code name, which is used as discount code title as well.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'code' => [
|
||||
'description' => __('A unique identification to redeem the discount code. E.g. PROMO10.', 'wp-ultimo'),
|
||||
'description' => __('A unique identification to redeem the discount code. E.g. PROMO10.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'description' => [
|
||||
'description' => __('A description for the discount code, usually a short text.', 'wp-ultimo'),
|
||||
'description' => __('A description for the discount code, usually a short text.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'uses' => [
|
||||
'description' => __('Number of times this discount was applied.', 'wp-ultimo'),
|
||||
'description' => __('Number of times this discount was applied.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'max_uses' => [
|
||||
'description' => __('The number of times this discount can be used before becoming inactive.', 'wp-ultimo'),
|
||||
'description' => __('The number of times this discount can be used before becoming inactive.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'apply_to_renewals' => [
|
||||
'description' => __('Wether or not we should apply the discount to membership renewals.', 'wp-ultimo'),
|
||||
'description' => __('Wether or not we should apply the discount to membership renewals.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'type' => [
|
||||
'description' => __("The type of the discount code. Can be 'percentage' (e.g. 10%% OFF), 'absolute' (e.g. $10 OFF).", 'wp-ultimo'),
|
||||
'description' => __("The type of the discount code. Can be 'percentage' (e.g. 10%% OFF), 'absolute' (e.g. $10 OFF).", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -59,12 +59,12 @@ return [
|
||||
],
|
||||
],
|
||||
'value' => [
|
||||
'description' => __('Amount discounted in cents.', 'wp-ultimo'),
|
||||
'description' => __('Amount discounted in cents.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'setup_fee_type' => [
|
||||
'description' => __('Type of the discount for the setup fee value. Can be a percentage or absolute.', 'wp-ultimo'),
|
||||
'description' => __('Type of the discount for the setup fee value. Can be a percentage or absolute.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -73,52 +73,52 @@ return [
|
||||
],
|
||||
],
|
||||
'setup_fee_value' => [
|
||||
'description' => __('Amount discounted for setup fees in cents.', 'wp-ultimo'),
|
||||
'description' => __('Amount discounted for setup fees in cents.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'active' => [
|
||||
'description' => __('Set this discount code as active (true), which means available to be used, or inactive (false).', 'wp-ultimo'),
|
||||
'description' => __('Set this discount code as active (true), which means available to be used, or inactive (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'date_start' => [
|
||||
'description' => __('Start date for the coupon code to be considered valid.', 'wp-ultimo'),
|
||||
'description' => __('Start date for the coupon code to be considered valid.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_expiration' => [
|
||||
'description' => __('Expiration date for the coupon code.', 'wp-ultimo'),
|
||||
'description' => __('Expiration date for the coupon code.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Date when this discount code was created.', 'wp-ultimo'),
|
||||
'description' => __('Date when this discount code was created.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'allowed_products' => [
|
||||
'description' => __('The list of products that allows this discount code to be used. If empty, all products will accept this code.', 'wp-ultimo'),
|
||||
'description' => __('The list of products that allows this discount code to be used. If empty, all products will accept this code.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'limit_products' => [
|
||||
'description' => __('This discount code will be limited to be used in certain products? If set to true, you must define a list of allowed products.', 'wp-ultimo'),
|
||||
'description' => __('This discount code will be limited to be used in certain products? If set to true, you must define a list of allowed products.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'date_modified' => [
|
||||
'description' => __('Model last modification date.', 'wp-ultimo'),
|
||||
'description' => __('Model last modification date.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'migrated_from_id' => [
|
||||
'description' => __('The ID of the original 1.X model that was used to generate this item on migration.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the original 1.X model that was used to generate this item on migration.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'skip_validation' => [
|
||||
'description' => __('Set true to have field information validation bypassed when saving this event.', 'wp-ultimo'),
|
||||
'description' => __('Set true to have field information validation bypassed when saving this event.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
|
Reference in New Issue
Block a user