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:
.phpcs.xml.distlogo.pnglogo.webpcomposer.jsoncomposer.lock
assets
css
img
flags
1x1
ad.svgae.svgaf.svgag.svgai.svgal.svgam.svgao.svgaq.svgar.svgas.svgat.svgau.svgaw.svgax.svgaz.svgba.svgbb.svgbd.svgbe.svgbf.svgbg.svgbh.svgbi.svgbj.svgbl.svgbm.svgbn.svgbo.svgbq.svgbr.svgbs.svgbt.svgbv.svgbw.svgby.svgbz.svgca.svgcc.svgcd.svgcf.svgcg.svgch.svgci.svgck.svgcl.svgcm.svgcn.svgco.svgcr.svgcu.svgcv.svgcw.svgcx.svgcy.svgcz.svgde.svgdj.svgdk.svgdm.svgdo.svgdz.svgec.svgee.svgeg.svgeh.svger.svges-ca.svges-ga.svges.svget.svgeu.svgfi.svgfj.svgfk.svgfm.svgfo.svgfr.svgga.svggb-eng.svggb-nir.svggb-sct.svggb-wls.svggb.svggd.svgge.svggf.svggg.svggh.svggi.svggl.svggm.svggn.svggp.svggq.svggr.svggs.svggt.svggu.svggw.svggy.svghk.svghm.svghn.svghr.svght.svghu.svgid.svgie.svgil.svgim.svgin.svgio.svgiq.svgir.svgis.svgit.svgje.svgjm.svgjo.svgjp.svgke.svgkg.svgkh.svgki.svgkm.svgkn.svgkp.svgkr.svgkw.svgky.svgkz.svgla.svglb.svglc.svgli.svglk.svglr.svgls.svglt.svglu.svglv.svgly.svgma.svgmc.svgmd.svgme.svgmf.svgmg.svgmh.svgmk.svgml.svgmm.svgmn.svgmo.svgmp.svgmq.svgmr.svgms.svgmt.svgmu.svgmv.svgmw.svgmx.svgmy.svgmz.svgna.svgnc.svgne.svgnf.svgng.svgni.svgnl.svgno.svgnp.svgnr.svgnu.svgnz.svgom.svgpa.svgpe.svgpf.svgpg.svgph.svgpk.svgpl.svgpm.svgpn.svgpr.svgps.svgpt.svgpw.svgpy.svgqa.svgre.svgro.svgrs.svgru.svgrw.svgsa.svgsb.svgsc.svgsd.svgse.svgsg.svgsh.svgsi.svgsj.svgsk.svgsl.svgsm.svgsn.svgso.svgsr.svgss.svgst.svgsv.svgsx.svgsy.svgsz.svgtc.svgtd.svgtf.svgtg.svgth.svgtj.svgtk.svgtl.svgtm.svgtn.svgto.svgtr.svgtt.svgtv.svgtw.svgtz.svgua.svgug.svgum.svgun.svgus.svguy.svguz.svgva.svgvc.svgve.svgvg.svgvi.svgvn.svgvu.svgwf.svgws.svgxk.svgye.svgyt.svgza.svgzm.svgzw.svg
4x3
ad.svgae.svgaf.svgag.svgai.svgal.svgam.svgao.svgaq.svgar.svgas.svgat.svgau.svgaw.svgax.svgaz.svgba.svgbb.svgbd.svgbe.svgbf.svgbg.svgbh.svgbi.svgbj.svgbl.svgbm.svgbn.svgbo.svgbq.svgbr.svgbs.svgbt.svgbv.svgbw.svgby.svgbz.svgca.svgcc.svgcd.svgcf.svgcg.svgch.svgci.svgck.svgcl.svgcm.svgcn.svgco.svgcr.svgcu.svgcv.svgcw.svgcx.svgcy.svgcz.svgde.svgdj.svgdk.svgdm.svgdo.svgdz.svgec.svgee.svgeg.svgeh.svger.svges-ca.svges-ga.svges.svget.svgeu.svgfi.svgfj.svgfk.svgfm.svgfo.svgfr.svgga.svggb-eng.svggb-nir.svggb-sct.svggb-wls.svggb.svggd.svgge.svggf.svggg.svggh.svggi.svggl.svggm.svggn.svggp.svggq.svggr.svggs.svggt.svggu.svggw.svggy.svghk.svghm.svghn.svghr.svght.svghu.svgid.svgie.svgil.svgim.svgin.svgio.svgiq.svgir.svgis.svgit.svgje.svgjm.svgjo.svgjp.svgke.svgkg.svgkh.svgki.svgkm.svgkn.svgkp.svgkr.svgkw.svgky.svgkz.svgla.svglb.svglc.svgli.svglk.svglr.svgls.svglt.svglu.svglv.svgly.svgma.svgmc.svgmd.svgme.svgmf.svgmg.svgmh.svgmk.svgml.svgmm.svgmn.svgmo.svgmp.svgmq.svgmr.svgms.svgmt.svgmu.svgmv.svgmw.svgmx.svgmy.svgmz.svgna.svgnc.svgne.svgnf.svgng.svgni.svgnl.svgno.svgnp.svgnr.svgnu.svgnz.svgom.svgpa.svgpe.svgpf.svgpg.svgph.svgpk.svgpl.svgpm.svgpn.svgpr.svgps.svgpt.svgpw.svgpy.svgqa.svgre.svgro.svgrs.svgru.svgrw.svgsa.svgsb.svgsc.svgsd.svgse.svgsg.svgsh.svgsi.svgsj.svgsk.svgsl.svgsm.svgsn.svgso.svgsr.svgss.svgst.svgsv.svgsx.svgsy.svgsz.svgtc.svgtd.svgtf.svgtg.svgth.svgtj.svgtk.svgtl.svgtm.svgtn.svgto.svgtr.svgtt.svgtv.svgtw.svgtz.svgua.svgug.svgum.svgun.svgus.svguy.svguz.svgva.svgvc.svgve.svgvg.svgvi.svgvn.svgvu.svgwf.svgws.svgxk.svgye.svgyt.svgza.svgzm.svgzw.svg
js
addons.min.jsadmin-notices.min.jsadmin-screen.min.jsadmin.min.jsapp.min.jscheckout-form-editor-modal.min.jscheckout-forms-editor.min.jscheckout.min.jscookie-helpers.min.jscustomizer.min.jsdashboard-statistics.min.jsdns-table.jsdns-table.min.jsedit-placeholders.min.jsemail-edit-page.min.jsevent-view-page.min.jsfields.min.jsflags.jsflags.min.jsfunctions.min.jsgutenberg-support.min.jsjumper.min.jslegacy-signup.min.jslist-tables.min.jsscreenshot-scraper.min.jsselectizer.min.jssettings-loader.jssettings-loader.min.jssetup-wizard-polyfill.min.jssetup-wizard.min.jssite-maintenance.min.jssso.min.jssupport.min.jstax-rates.min.jstax-statistics.min.jstemplate-previewer.min.jstemplate-switching.min.jsthank-you.min.jstours.min.jsurl-preview.min.jsview-logs.min.jsvisits-counter.min.jsvue-apps.min.jswebhook-page.jswebhook-page.min.jswubox.min.js
data
inc
admin-pages
class-about-admin-page.phpclass-base-admin-page.phpclass-base-customer-facing-admin-page.phpclass-broadcast-edit-admin-page.phpclass-broadcast-list-admin-page.phpclass-checkout-form-edit-admin-page.phpclass-checkout-form-list-admin-page.phpclass-customer-edit-admin-page.phpclass-customer-list-admin-page.phpclass-customizer-admin-page.phpclass-dashboard-admin-page.phpclass-discount-code-edit-admin-page.phpclass-discount-code-list-admin-page.phpclass-domain-edit-admin-page.phpclass-domain-list-admin-page.phpclass-edit-admin-page.phpclass-email-edit-admin-page.phpclass-email-list-admin-page.phpclass-email-template-customize-admin-page.phpclass-event-list-admin-page.phpclass-event-view-admin-page.phpclass-hosting-integration-wizard-admin-page.phpclass-invoice-template-customize-admin-page.phpclass-jobs-list-admin-page.phpclass-list-admin-page.phpclass-membership-edit-admin-page.phpclass-membership-list-admin-page.phpclass-migration-alert-admin-page.phpclass-payment-edit-admin-page.phpclass-payment-list-admin-page.phpclass-placeholders-admin-page.phpclass-product-edit-admin-page.phpclass-product-list-admin-page.phpclass-settings-admin-page.phpclass-setup-wizard-admin-page.phpclass-shortcodes-admin-page.phpclass-site-edit-admin-page.phpclass-site-list-admin-page.phpclass-system-info-admin-page.phpclass-tax-rates-admin-page.phpclass-template-previewer-customize-admin-page.phpclass-top-admin-nav-menu.phpclass-view-logs-admin-page.phpclass-webhook-edit-admin-page.phpclass-webhook-list-admin-page.phpclass-wizard-admin-page.php
customer-panel
class-account-admin-page.phpclass-add-new-site-admin-page.phpclass-checkout-admin-page.phpclass-my-sites-admin-page.phpclass-template-switching-admin-page.php
debug
api
class-register-endpoint.php
schemas
broadcast-create.phpbroadcast-update.phpcheckout-form-create.phpcheckout-form-update.phpcustomer-create.phpcustomer-update.phpdiscount-code-create.phpdiscount-code-update.phpdomain-create.phpdomain-update.phpemail-create.phpemail-update.phpevent-create.phpevent-update.phpmembership-create.phpmembership-update.phppayment-create.phppayment-update.phpproduct-create.phpproduct-update.phpsite-create.phpsite-update.phpwebhook-create.phpwebhook-update.php
trait-rest-api.phptrait-wp-cli.phpbuilders
block-editor
checkout
class-cart.phpclass-checkout-pages.phpclass-checkout.phpclass-legacy-checkout.phpclass-line-item.php
class-admin-notices.phpclass-ajax.phpclass-api.phpclass-async-calls.phpclass-dashboard-widgets.phpclass-domain-mapping.phpclass-faker.phpclass-helper.phpclass-hooks.phpclass-light-ajax.phpclass-logger.phpclass-maintenance-mode.phpclass-newsletter.phpclass-requirements.phpclass-scripts.phpclass-session-cookie.phpclass-settings.phpclass-sunrise.phpclass-user-switching.phpclass-views.phpclass-whitelabel.phpclass-wp-ultimo.phpsignup-fields
class-base-signup-field.phpclass-signup-field-billing-address.phpclass-signup-field-checkbox.phpclass-signup-field-color.phpclass-signup-field-discount-code.phpclass-signup-field-email.phpclass-signup-field-hidden.phpclass-signup-field-order-bump.phpclass-signup-field-order-summary.phpclass-signup-field-password.phpclass-signup-field-payment.phpclass-signup-field-period-selection.phpclass-signup-field-pricing-table.phpclass-signup-field-products.phpclass-signup-field-select.phpclass-signup-field-shortcode.phpclass-signup-field-site-title.phpclass-signup-field-site-url.phpclass-signup-field-steps.phpclass-signup-field-submit-button.phpclass-signup-field-template-selection.phpclass-signup-field-terms-of-use.phpclass-signup-field-text.phpclass-signup-field-username.php
field-templates
class-base-field-template.php
order-bump
order-summary
period-selection
pricing-table
steps
class-clean-steps-field-template.phpclass-legacy-steps-field-template.phpclass-minimal-steps-field-template.php
template-selection
compat
class-general-compat.phpclass-gutenberg-support.phpclass-legacy-shortcodes.phpclass-multiple-accounts-compat.phpclass-product-compat.php
country
class-country-br.phpclass-country-ca.phpclass-country-cn.phpclass-country-de.phpclass-country-es.phpclass-country-fr.phpclass-country-gb.phpclass-country-in.phpclass-country-jp.phpclass-country-mx.phpclass-country-my.phpclass-country-ne.phpclass-country-nl.phpclass-country-ru.phpclass-country-sg.phpclass-country-tr.phpclass-country-us.phpclass-country-za.phpclass-country.php
database
domains
engine
memberships
payments
products
sites
debug
deprecated
development
domain-mapping
duplication
functions
admin.phpcompatiblity.phpcountries.phpcurrency.phpcustomer.phpdate.phpfinancial.phpgateway.phplegacy.phplimitations.phpmarkup-helpers.phpmembership.phpmock.phpoptions.phpsettings.phpsort.phpstring-helpers.phpsunrise.phpurl.phpuser.php
gateways
class-base-gateway.phpclass-base-stripe-gateway.phpclass-manual-gateway.phpclass-paypal-gateway.phpclass-stripe-checkout-gateway.phpclass-stripe-gateway.php
helpers
class-arr.phpclass-screenshot.phpclass-site-duplicator.phpclass-validator.phpclass-wp-config.php
validation-rules
installers
integrations
host-providers
class-base-host-provider.phpclass-closte-host-provider.phpclass-cloudflare-host-provider.phpclass-cloudways-host-provider.phpclass-cpanel-host-provider.phpclass-gridpane-host-provider.phpclass-runcloud-host-provider.phpclass-serverpilot-host-provider.phpclass-wpengine-host-provider.phpclass-wpmudev-host-provider.php
cpanel-api
internal
invoices
limitations
limits
class-customer-user-role-limits.phpclass-plugin-limits.phpclass-post-type-limits.phpclass-theme-limits.php
list-tables
class-base-list-table.phpclass-broadcast-list-table.phpclass-checkout-form-list-table.phpclass-customer-list-table.phpclass-customers-membership-list-table.phpclass-customers-payment-list-table.phpclass-customers-site-list-table.phpclass-discount-code-list-table.phpclass-domain-list-table.phpclass-email-list-table.phpclass-event-list-table.phpclass-inside-events-list-table.phpclass-line-item-list-table.phpclass-membership-line-item-list-table.phpclass-membership-list-table-widget.phpclass-membership-list-table.phpclass-memberships-site-list-table.phpclass-payment-line-item-list-table.phpclass-payment-list-table-widget.phpclass-payment-list-table.phpclass-product-list-table.phpclass-site-customer-list-table.phpclass-site-list-table.phpclass-sites-domain-list-table.phpclass-webhook-list-table.php
customer-panel
managers
class-block-manager.phpclass-broadcast-manager.phpclass-customer-manager.phpclass-domain-manager.phpclass-email-manager.phpclass-event-manager.phpclass-field-templates-manager.phpclass-form-manager.phpclass-gateway-manager.phpclass-limitation-manager.phpclass-membership-manager.phpclass-notes-manager.phpclass-notification-manager.phpclass-payment-manager.phpclass-site-manager.phpclass-visits-manager.phpclass-webhook-manager.php
models
class-base-model.phpclass-broadcast.phpclass-checkout-form.phpclass-customer.phpclass-discount-code.phpclass-domain.phpclass-event.phpclass-membership.phpclass-payment.phpclass-product.phpclass-site.phpinterface-limitable.php
traits
objects
site-templates
sso
tax
traits
trait-singleton.phptrait-wp-ultimo-coupon-deprecated.phptrait-wp-ultimo-plan-deprecated.phptrait-wp-ultimo-settings-deprecated.phptrait-wp-ultimo-site-deprecated.phptrait-wp-ultimo-subscription-deprecated.php
ui
class-account-summary-element.phpclass-base-element.phpclass-billing-info-element.phpclass-checkout-element.phpclass-current-membership-element.phpclass-current-site-element.phpclass-domain-mapping-element.phpclass-invoices-element.phpclass-jumper.phpclass-limits-element.phpclass-login-form-element.phpclass-my-sites-element.phpclass-payment-methods-element.phpclass-simple-text-element.phpclass-site-actions-element.phpclass-site-maintenance-element.phpclass-template-previewer.phpclass-template-switching-element.phpclass-thank-you-element.phpclass-tours.php
lang
loco.xmlpackage-lock.jsonpackage.jsonphpstan.neon.distsetuptest.shsunrise.phptests/Admin_Pages
utils/rector
src
Rector
tests
Rector
YodaConditionsRector
views
about.phpadmin-notices.php
wp-multisite-waas.phpadmin-pages
fields
field-actions.phpfield-code-editor.phpfield-color-picker.phpfield-dashicon.phpfield-group.phpfield-header.phpfield-hidden.phpfield-html.phpfield-image.phpfield-link.phpfield-multiselect.phpfield-note.phpfield-repeater.phpfield-select-icon.phpfield-select.phpfield-small-header.phpfield-submit.phpfield-tab-select.phpfield-text-display.phpfield-text-edit.phpfield-text.phpfield-textarea.phpfield-toggle.phpfield-wp-editor.phpform.php
partials
base
centered.php
checkout-forms
customers
dash.phpedit.phpedit
empty-state.phpfilter.phpgrid.phplist.phpproducts
responsive-table-row.phpsettings.phpsites
wizard.phpwizard
broadcast
checkout
fields
field-checkbox-multi.phpfield-checkbox.phpfield-group.phpfield-hidden.phpfield-html.phpfield-note.phpfield-password.phpfield-payment-methods.phpfield-products.phpfield-radio.phpfield-select.phpfield-submit.phpfield-text.phpfield-toggle.phpform.php
partials
paypal
register.phptemplates
order-bump
order-summary
period-selection
pricing-table
steps
template-selection
customers
dashboard-statistics
filter.phpwidget-countries.phpwidget-forms.phpwidget-most-visited-sites.phpwidget-mrr-growth.phpwidget-new-accounts.phpwidget-revenue.phpwidget-tax-by-code.phpwidget-tax-by-day.phpwidget-tax-graph.phpwidget-taxes.php
dashboard-widgets
account-summary.phpactivity-stream.phpbilling-info.phpcurrent-membership-product-details.phpcurrent-membership.phpcurrent-site.phpdomain-mapping.phpfirst-steps.phpinvoices.phplimits-and-quotas.phplogin-form.phpmy-sites.phpsite-actions.phpsummary.phpthank-you.php
domain
email
emails
admin
customer
events
invoice
legacy
signup
limitations
memberships
payments
settings
shortcodes
sites
system-info
taxes
ui
branding
container-toggle.phpjumper-trigger.phpjumper.phpselectize-templates.phptemplate-previewer.phptoolbox.phpwizards
@ -93,7 +93,7 @@ class Register_Endpoint {
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @param \WP_REST_Request $request WP Request Object.
|
||||
* @return array
|
||||
* @return array|\WP_Error
|
||||
*/
|
||||
public function handle_endpoint($request) {
|
||||
|
||||
@ -102,7 +102,7 @@ class Register_Endpoint {
|
||||
$params = json_decode($request->get_body(), true);
|
||||
|
||||
if (\WP_Ultimo\API::get_instance()->should_log_api_calls()) {
|
||||
wu_log_add('api-calls', json_encode($params, JSON_PRETTY_PRINT));
|
||||
wu_log_add('api-calls', wp_json_encode($params, JSON_PRETTY_PRINT));
|
||||
}
|
||||
|
||||
$validation_errors = $this->validate($params);
|
||||
@ -130,7 +130,7 @@ class Register_Endpoint {
|
||||
|
||||
$customer->add_note(
|
||||
[
|
||||
'text' => __('Created via REST API', 'wp-ultimo'),
|
||||
'text' => __('Created via REST API', 'wp-multisite-waas'),
|
||||
'author_id' => $customer->get_user_id(),
|
||||
]
|
||||
);
|
||||
@ -168,7 +168,7 @@ class Register_Endpoint {
|
||||
if ($cart->is_valid() && count($cart->get_line_items()) === 0) {
|
||||
return new \WP_Error(
|
||||
'invalid_cart',
|
||||
__('Products are required.', 'wp-ultimo'),
|
||||
__('Products are required.', 'wp-multisite-waas'),
|
||||
array_merge(
|
||||
(array) $cart->done(),
|
||||
[
|
||||
@ -215,7 +215,7 @@ class Register_Endpoint {
|
||||
|
||||
$membership->add_note(
|
||||
[
|
||||
'text' => __('Created via REST API', 'wp-ultimo'),
|
||||
'text' => __('Created via REST API', 'wp-multisite-waas'),
|
||||
'author_id' => $customer->get_user_id(),
|
||||
]
|
||||
);
|
||||
@ -253,7 +253,7 @@ class Register_Endpoint {
|
||||
|
||||
$payment->add_note(
|
||||
[
|
||||
'text' => __('Created via REST API', 'wp-ultimo'),
|
||||
'text' => __('Created via REST API', 'wp-multisite-waas'),
|
||||
'author_id' => $customer->get_user_id(),
|
||||
]
|
||||
);
|
||||
@ -333,29 +333,29 @@ class Register_Endpoint {
|
||||
|
||||
$customer_args = [
|
||||
'customer_id' => [
|
||||
'description' => __('The customer ID, if the customer already exists. If you also need to create a customer/wp user, use the "customer" property.', 'wp-ultimo'),
|
||||
'description' => __('The customer ID, if the customer already exists. If you also need to create a customer/wp user, use the "customer" property.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
],
|
||||
'customer' => [
|
||||
'description' => __('Customer data. Needs to be present when customer id is not.', 'wp-ultimo'),
|
||||
'description' => __('Customer data. Needs to be present when customer id is not.', 'wp-multisite-waas'),
|
||||
'type' => 'object',
|
||||
'properties' => [
|
||||
'user_id' => [
|
||||
'description' => __('Existing WordPress user id to attach this customer to. If you also need to create a WordPress user, pass the properties "username", "password", and "email".', 'wp-ultimo'),
|
||||
'description' => __('Existing WordPress user id to attach this customer to. If you also need to create a WordPress user, pass the properties "username", "password", and "email".', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
],
|
||||
'username' => [
|
||||
'description' => __('The customer username. This is used to create the WordPress user.', 'wp-ultimo'),
|
||||
'description' => __('The customer username. This is used to create the WordPress user.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'minLength' => 4,
|
||||
],
|
||||
'password' => [
|
||||
'description' => __('The customer password. This is used to create the WordPress user. Note that no validation is performed here to enforce strength.', 'wp-ultimo'),
|
||||
'description' => __('The customer password. This is used to create the WordPress user. Note that no validation is performed here to enforce strength.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'minLength' => 6,
|
||||
],
|
||||
'email' => [
|
||||
'description' => __('The customer email address. This is used to create the WordPress user.', 'wp-ultimo'),
|
||||
'description' => __('The customer email address. This is used to create the WordPress user.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'format' => 'email',
|
||||
],
|
||||
@ -369,42 +369,42 @@ class Register_Endpoint {
|
||||
|
||||
$membership_args = [
|
||||
'membership' => [
|
||||
'description' => __('The membership data is automatically generated based on the cart info passed (e.g. products) but can be overridden with this property.', 'wp-ultimo'),
|
||||
'description' => __('The membership data is automatically generated based on the cart info passed (e.g. products) but can be overridden with this property.', 'wp-multisite-waas'),
|
||||
'type' => 'object',
|
||||
'properties' => [
|
||||
'status' => [
|
||||
'description' => __('The membership status.', 'wp-ultimo'),
|
||||
'description' => __('The membership status.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'enum' => array_values(Membership_Status::get_allowed_list()),
|
||||
'default' => Membership_Status::PENDING,
|
||||
],
|
||||
'date_expiration' => [
|
||||
'description' => __('The membership expiration date. Must be a valid PHP date format.', 'wp-ultimo'),
|
||||
'description' => __('The membership expiration date. Must be a valid PHP date format.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'format' => 'date-time',
|
||||
],
|
||||
'date_trial_end' => [
|
||||
'description' => __('The membership trial end date. Must be a valid PHP date format.', 'wp-ultimo'),
|
||||
'description' => __('The membership trial end date. Must be a valid PHP date format.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'format' => 'date-time',
|
||||
],
|
||||
'date_activated' => [
|
||||
'description' => __('The membership activation date. Must be a valid PHP date format.', 'wp-ultimo'),
|
||||
'description' => __('The membership activation date. Must be a valid PHP date format.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'format' => 'date-time',
|
||||
],
|
||||
'date_renewed' => [
|
||||
'description' => __('The membership last renewed date. Must be a valid PHP date format.', 'wp-ultimo'),
|
||||
'description' => __('The membership last renewed date. Must be a valid PHP date format.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'format' => 'date-time',
|
||||
],
|
||||
'date_cancellation' => [
|
||||
'description' => __('The membership cancellation date. Must be a valid PHP date format.', 'wp-ultimo'),
|
||||
'description' => __('The membership cancellation date. Must be a valid PHP date format.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'format' => 'date-time',
|
||||
],
|
||||
'date_payment_plan_completed' => [
|
||||
'description' => __('The membership completion date. Used when the membership is limited to a limited number of billing cycles. Must be a valid PHP date format.', 'wp-ultimo'),
|
||||
'description' => __('The membership completion date. Used when the membership is limited to a limited number of billing cycles. Must be a valid PHP date format.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'format' => 'date-time',
|
||||
],
|
||||
@ -414,11 +414,11 @@ class Register_Endpoint {
|
||||
|
||||
$payment_args = [
|
||||
'payment' => [
|
||||
'description' => __('The payment data is automatically generated based on the cart info passed (e.g. products) but can be overridden with this property.', 'wp-ultimo'),
|
||||
'description' => __('The payment data is automatically generated based on the cart info passed (e.g. products) but can be overridden with this property.', 'wp-multisite-waas'),
|
||||
'type' => 'object',
|
||||
'properties' => [
|
||||
'status' => [
|
||||
'description' => __('The payment status.', 'wp-ultimo'),
|
||||
'description' => __('The payment status.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'enum' => array_values(Payment_Status::get_allowed_list()),
|
||||
'default' => Payment_Status::PENDING,
|
||||
@ -426,23 +426,23 @@ class Register_Endpoint {
|
||||
],
|
||||
],
|
||||
'payment_method' => [
|
||||
'description' => __('Payment method information. Useful when using the REST API to integrate other payment methods.', 'wp-ultimo'),
|
||||
'description' => __('Payment method information. Useful when using the REST API to integrate other payment methods.', 'wp-multisite-waas'),
|
||||
'type' => 'object',
|
||||
'properties' => [
|
||||
'gateway' => [
|
||||
'description' => __('The gateway name. E.g. stripe.', 'wp-ultimo'),
|
||||
'description' => __('The gateway name. E.g. stripe.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
],
|
||||
'gateway_customer_id' => [
|
||||
'description' => __('The customer ID on the gateway system.', 'wp-ultimo'),
|
||||
'description' => __('The customer ID on the gateway system.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
],
|
||||
'gateway_subscription_id' => [
|
||||
'description' => __('The subscription ID on the gateway system.', 'wp-ultimo'),
|
||||
'description' => __('The subscription ID on the gateway system.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
],
|
||||
'gateway_payment_id' => [
|
||||
'description' => __('The payment ID on the gateway system.', 'wp-ultimo'),
|
||||
'description' => __('The payment ID on the gateway system.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
],
|
||||
],
|
||||
@ -455,31 +455,31 @@ class Register_Endpoint {
|
||||
'properties' => [
|
||||
'site_url' => [
|
||||
'type' => 'string',
|
||||
'description' => __('The site subdomain or subdirectory (depending on your Multisite install). This would be "test" in "test.your-network.com".', 'wp-ultimo'),
|
||||
'description' => __('The site subdomain or subdirectory (depending on your Multisite install). This would be "test" in "test.your-network.com".', 'wp-multisite-waas'),
|
||||
'minLength' => 4,
|
||||
'required' => true,
|
||||
],
|
||||
'site_title' => [
|
||||
'type' => 'string',
|
||||
'description' => __('The site title. E.g. My Amazing Site', 'wp-ultimo'),
|
||||
'description' => __('The site title. E.g. My Amazing Site', 'wp-multisite-waas'),
|
||||
'minLength' => 4,
|
||||
'required' => true,
|
||||
],
|
||||
'publish' => [
|
||||
'description' => __('If we should publish this site regardless of membership/payment status. Sites are created as pending by default, and are only published when a payment is received or the status of the membership changes to "active". This flag allows you to bypass the pending state.', 'wp-ultimo'),
|
||||
'description' => __('If we should publish this site regardless of membership/payment status. Sites are created as pending by default, and are only published when a payment is received or the status of the membership changes to "active". This flag allows you to bypass the pending state.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'default' => false,
|
||||
],
|
||||
'template_id' => [
|
||||
'description' => __('The template ID we should copy when creating this site. If left empty, the value dictated by the products will be used.', 'wp-ultimo'),
|
||||
'description' => __('The template ID we should copy when creating this site. If left empty, the value dictated by the products will be used.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
],
|
||||
'site_meta' => [
|
||||
'description' => __('An associative array of key values to be saved as site_meta.', 'wp-ultimo'),
|
||||
'description' => __('An associative array of key values to be saved as site_meta.', 'wp-multisite-waas'),
|
||||
'type' => 'object',
|
||||
],
|
||||
'site_option' => [
|
||||
'description' => __('An associative array of key values to be saved as site_options. Useful for changing plugin settings and other site configurations.', 'wp-ultimo'),
|
||||
'description' => __('An associative array of key values to be saved as site_options. Useful for changing plugin settings and other site configurations.', 'wp-multisite-waas'),
|
||||
'type' => 'object',
|
||||
],
|
||||
],
|
||||
@ -488,17 +488,17 @@ class Register_Endpoint {
|
||||
|
||||
$cart_args = [
|
||||
'products' => [
|
||||
'description' => __('The products to be added to this membership. Takes an array of product ids or slugs.', 'wp-ultimo'),
|
||||
'description' => __('The products to be added to this membership. Takes an array of product ids or slugs.', 'wp-multisite-waas'),
|
||||
'uniqueItems' => true,
|
||||
'type' => 'array',
|
||||
],
|
||||
'duration' => [
|
||||
'description' => __('The membership duration.', 'wp-ultimo'),
|
||||
'description' => __('The membership duration.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'duration_unit' => [
|
||||
'description' => __('The membership duration unit.', 'wp-ultimo'),
|
||||
'description' => __('The membership duration unit.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'default' => 'month',
|
||||
'enum' => [
|
||||
@ -509,22 +509,22 @@ class Register_Endpoint {
|
||||
],
|
||||
],
|
||||
'discount_code' => [
|
||||
'description' => __('A discount code. E.g. PROMO10.', 'wp-ultimo'),
|
||||
'description' => __('A discount code. E.g. PROMO10.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
],
|
||||
'auto_renew' => [
|
||||
'description' => __('The membership auto-renew status. Useful when integrating with other payment options via this REST API.', 'wp-ultimo'),
|
||||
'description' => __('The membership auto-renew status. Useful when integrating with other payment options via this REST API.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'default' => false,
|
||||
'required' => true,
|
||||
],
|
||||
'country' => [
|
||||
'description' => __('The customer country. Used to calculate taxes and check if registration is allowed for that country.', 'wp-ultimo'),
|
||||
'description' => __('The customer country. Used to calculate taxes and check if registration is allowed for that country.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
],
|
||||
'currency' => [
|
||||
'description' => __('The currency to be used.', 'wp-ultimo'),
|
||||
'description' => __('The currency to be used.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
],
|
||||
];
|
||||
@ -550,7 +550,7 @@ class Register_Endpoint {
|
||||
$customer = wu_get_customer($customer_id);
|
||||
|
||||
if ( ! $customer) {
|
||||
return new \WP_Error('customer_not_found', __('The customer id sent does not correspond to a valid customer.', 'wp-ultimo'));
|
||||
return new \WP_Error('customer_not_found', __('The customer id sent does not correspond to a valid customer.', 'wp-multisite-waas'));
|
||||
}
|
||||
} else {
|
||||
$customer = wu_create_customer($p['customer']);
|
||||
|
@ -20,12 +20,12 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'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,
|
||||
],
|
||||
'notice_type' => [
|
||||
'description' => __('Can be info, success, warning or error.', 'wp-ultimo'),
|
||||
'description' => __('Can be info, success, warning or error.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -36,57 +36,57 @@ return [
|
||||
],
|
||||
],
|
||||
'name' => [
|
||||
'description' => __('This broadcast name, which is used as broadcast title as well.', 'wp-ultimo'),
|
||||
'description' => __('This broadcast name, which is used as broadcast title as well.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'type' => [
|
||||
'description' => __('The type being set.', 'wp-ultimo'),
|
||||
'description' => __('The type being set.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'status' => [
|
||||
'description' => __('The status being set.', 'wp-ultimo'),
|
||||
'description' => __('The status being set.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'author_id' => [
|
||||
'description' => __('The author ID.', 'wp-ultimo'),
|
||||
'description' => __('The author ID.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'title' => [
|
||||
'description' => __('Post title.', 'wp-ultimo'),
|
||||
'description' => __('Post title.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'content' => [
|
||||
'description' => __('Post content.', 'wp-ultimo'),
|
||||
'description' => __('Post content.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'excerpt' => [
|
||||
'description' => __('Post excerpt.', 'wp-ultimo'),
|
||||
'description' => __('Post excerpt.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Post creation date.', 'wp-ultimo'),
|
||||
'description' => __('Post creation date.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_modified' => [
|
||||
'description' => __('Post last modification date.', 'wp-ultimo'),
|
||||
'description' => __('Post last modification date.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'slug' => [
|
||||
'description' => __('The slug.', 'wp-ultimo'),
|
||||
'description' => __('The slug.', 'wp-multisite-waas'),
|
||||
'type' => 'mixed',
|
||||
'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,
|
||||
],
|
||||
|
@ -20,12 +20,12 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'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,
|
||||
],
|
||||
'notice_type' => [
|
||||
'description' => __('Can be info, success, warning or error.', 'wp-ultimo'),
|
||||
'description' => __('Can be info, success, warning or error.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -36,57 +36,57 @@ return [
|
||||
],
|
||||
],
|
||||
'name' => [
|
||||
'description' => __('This broadcast name, which is used as broadcast title as well.', 'wp-ultimo'),
|
||||
'description' => __('This broadcast name, which is used as broadcast title as well.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'type' => [
|
||||
'description' => __('The type being set.', 'wp-ultimo'),
|
||||
'description' => __('The type being set.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'status' => [
|
||||
'description' => __('The status being set.', 'wp-ultimo'),
|
||||
'description' => __('The status being set.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'author_id' => [
|
||||
'description' => __('The author ID.', 'wp-ultimo'),
|
||||
'description' => __('The author ID.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'title' => [
|
||||
'description' => __('Post title.', 'wp-ultimo'),
|
||||
'description' => __('Post title.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'content' => [
|
||||
'description' => __('Post content.', 'wp-ultimo'),
|
||||
'description' => __('Post content.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'excerpt' => [
|
||||
'description' => __('Post excerpt.', 'wp-ultimo'),
|
||||
'description' => __('Post excerpt.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Post creation date.', 'wp-ultimo'),
|
||||
'description' => __('Post creation date.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_modified' => [
|
||||
'description' => __('Post last modification date.', 'wp-ultimo'),
|
||||
'description' => __('Post last modification date.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'slug' => [
|
||||
'description' => __('The slug.', 'wp-ultimo'),
|
||||
'description' => __('The slug.', 'wp-multisite-waas'),
|
||||
'type' => 'mixed',
|
||||
'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,
|
||||
],
|
||||
|
@ -20,47 +20,47 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'slug' => [
|
||||
'description' => __('The checkout form slug. It needs to be unique and preferably make it clear what it is about. E.g. my_checkout_form.', 'wp-ultimo'),
|
||||
'description' => __('The checkout form slug. It needs to be unique and preferably make it clear what it is about. E.g. my_checkout_form.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'name' => [
|
||||
'description' => __('Your checkout form name, which is used as checkout form title as well.', 'wp-ultimo'),
|
||||
'description' => __('Your checkout form name, which is used as checkout form title as well.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'active' => [
|
||||
'description' => __('Set this checkout form as active (true), which means available to be used, or inactive (false).', 'wp-ultimo'),
|
||||
'description' => __('Set this checkout form as active (true), which means available to be used, or inactive (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => true,
|
||||
],
|
||||
'custom_css' => [
|
||||
'description' => __('Custom CSS code for the checkout form.', 'wp-ultimo'),
|
||||
'description' => __('Custom CSS code for the checkout form.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'settings' => [
|
||||
'description' => __('The checkout form settings and configurations.', 'wp-ultimo'),
|
||||
'description' => __('The checkout form settings and configurations.', 'wp-multisite-waas'),
|
||||
'type' => 'object',
|
||||
'required' => false,
|
||||
],
|
||||
'allowed_countries' => [
|
||||
'description' => __('The allowed countries that can access this checkout.', 'wp-ultimo'),
|
||||
'description' => __('The allowed countries that can access this checkout.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'thank_you_page_id' => [
|
||||
'description' => __('The thank you page ID. This page is shown after a successful purchase.', 'wp-ultimo'),
|
||||
'description' => __('The thank you page ID. This page is shown after a successful purchase.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'conversion_snippets' => [
|
||||
'description' => __('Snippets to run on thank you page.', 'wp-ultimo'),
|
||||
'description' => __('Snippets to run on thank you page.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'template' => [
|
||||
'description' => __("Template mode. Can be either 'blank', 'single-step' or 'multi-step'.", 'wp-ultimo'),
|
||||
'description' => __("Template mode. Can be either 'blank', 'single-step' or 'multi-step'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -70,22 +70,22 @@ return [
|
||||
],
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Model creation date.', 'wp-ultimo'),
|
||||
'description' => __('Model creation date.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'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,
|
||||
],
|
||||
|
@ -20,47 +20,47 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'slug' => [
|
||||
'description' => __('The checkout form slug. It needs to be unique and preferably make it clear what it is about. E.g. my_checkout_form.', 'wp-ultimo'),
|
||||
'description' => __('The checkout form slug. It needs to be unique and preferably make it clear what it is about. E.g. my_checkout_form.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'name' => [
|
||||
'description' => __('Your checkout form name, which is used as checkout form title as well.', 'wp-ultimo'),
|
||||
'description' => __('Your checkout form name, which is used as checkout form title as well.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'active' => [
|
||||
'description' => __('Set this checkout form as active (true), which means available to be used, or inactive (false).', 'wp-ultimo'),
|
||||
'description' => __('Set this checkout form as active (true), which means available to be used, or inactive (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'custom_css' => [
|
||||
'description' => __('Custom CSS code for the checkout form.', 'wp-ultimo'),
|
||||
'description' => __('Custom CSS code for the checkout form.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'settings' => [
|
||||
'description' => __('The checkout form settings and configurations.', 'wp-ultimo'),
|
||||
'description' => __('The checkout form settings and configurations.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'allowed_countries' => [
|
||||
'description' => __('The allowed countries that can access this checkout.', 'wp-ultimo'),
|
||||
'description' => __('The allowed countries that can access this checkout.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'thank_you_page_id' => [
|
||||
'description' => __('The thank you page ID. This page is shown after a successful purchase.', 'wp-ultimo'),
|
||||
'description' => __('The thank you page ID. This page is shown after a successful purchase.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'conversion_snippets' => [
|
||||
'description' => __('Snippets to run on thank you page.', 'wp-ultimo'),
|
||||
'description' => __('Snippets to run on thank you page.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'template' => [
|
||||
'description' => __("Template mode. Can be either 'blank', 'single-step' or 'multi-step'.", 'wp-ultimo'),
|
||||
'description' => __("Template mode. Can be either 'blank', 'single-step' or 'multi-step'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -70,22 +70,22 @@ return [
|
||||
],
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Model creation date.', 'wp-ultimo'),
|
||||
'description' => __('Model creation date.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'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,
|
||||
],
|
||||
|
@ -20,17 +20,17 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'user_id' => [
|
||||
'description' => __('The WordPress user ID attached to this customer.', 'wp-ultimo'),
|
||||
'description' => __('The WordPress user ID attached to this customer.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => true,
|
||||
],
|
||||
'date_registered' => [
|
||||
'description' => __('Date when the customer was created.', 'wp-ultimo'),
|
||||
'description' => __('Date when the customer was created.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'email_verification' => [
|
||||
'description' => __('Email verification status - either `none`, `pending`, or `verified`.', 'wp-ultimo'),
|
||||
'description' => __('Email verification status - either `none`, `pending`, or `verified`.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
'enum' => [
|
||||
@ -40,32 +40,32 @@ return [
|
||||
],
|
||||
],
|
||||
'last_login' => [
|
||||
'description' => __('Date this customer last logged in.', 'wp-ultimo'),
|
||||
'description' => __('Date this customer last logged in.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'has_trialed' => [
|
||||
'description' => __('Whether or not the customer has trialed before.', 'wp-ultimo'),
|
||||
'description' => __('Whether or not the customer has trialed before.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'vip' => [
|
||||
'description' => __('If this customer is a VIP customer or not.', 'wp-ultimo'),
|
||||
'description' => __('If this customer is a VIP customer or not.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'ips' => [
|
||||
'description' => __('List of IP addresses used by this customer.', 'wp-ultimo'),
|
||||
'description' => __('List of IP addresses used by this customer.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'extra_information' => [
|
||||
'description' => __('Any extra information related to this customer.', 'wp-ultimo'),
|
||||
'description' => __('Any extra information related to this customer.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'type' => [
|
||||
'description' => __("The customer type. Can be 'customer'.", 'wp-ultimo'),
|
||||
'description' => __("The customer type. Can be 'customer'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
'enum' => [
|
||||
@ -73,27 +73,27 @@ return [
|
||||
],
|
||||
],
|
||||
'signup_form' => [
|
||||
'description' => __('The form used to signup.', 'wp-ultimo'),
|
||||
'description' => __('The form used to signup.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Model creation date.', 'wp-ultimo'),
|
||||
'description' => __('Model creation date.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'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,
|
||||
],
|
||||
|
@ -20,17 +20,17 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'user_id' => [
|
||||
'description' => __('The WordPress user ID attached to this customer.', 'wp-ultimo'),
|
||||
'description' => __('The WordPress user ID attached to this customer.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'date_registered' => [
|
||||
'description' => __('Date when the customer was created.', 'wp-ultimo'),
|
||||
'description' => __('Date when the customer was created.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'email_verification' => [
|
||||
'description' => __('Email verification status - either `none`, `pending`, or `verified`.', 'wp-ultimo'),
|
||||
'description' => __('Email verification status - either `none`, `pending`, or `verified`.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -40,32 +40,32 @@ return [
|
||||
],
|
||||
],
|
||||
'last_login' => [
|
||||
'description' => __('Date this customer last logged in.', 'wp-ultimo'),
|
||||
'description' => __('Date this customer last logged in.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'has_trialed' => [
|
||||
'description' => __('Whether or not the customer has trialed before.', 'wp-ultimo'),
|
||||
'description' => __('Whether or not the customer has trialed before.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'vip' => [
|
||||
'description' => __('If this customer is a VIP customer or not.', 'wp-ultimo'),
|
||||
'description' => __('If this customer is a VIP customer or not.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'ips' => [
|
||||
'description' => __('List of IP addresses used by this customer.', 'wp-ultimo'),
|
||||
'description' => __('List of IP addresses used by this customer.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'extra_information' => [
|
||||
'description' => __('Any extra information related to this customer.', 'wp-ultimo'),
|
||||
'description' => __('Any extra information related to this customer.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'type' => [
|
||||
'description' => __("The customer type. Can be 'customer'.", 'wp-ultimo'),
|
||||
'description' => __("The customer type. Can be 'customer'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -73,27 +73,27 @@ return [
|
||||
],
|
||||
],
|
||||
'signup_form' => [
|
||||
'description' => __('The form used to signup.', 'wp-ultimo'),
|
||||
'description' => __('The form used to signup.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Model creation date.', 'wp-ultimo'),
|
||||
'description' => __('Model creation date.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'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,
|
||||
],
|
||||
|
@ -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' => true,
|
||||
],
|
||||
'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' => true,
|
||||
],
|
||||
'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' => true,
|
||||
],
|
||||
'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,
|
||||
],
|
||||
|
@ -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,
|
||||
],
|
||||
|
@ -20,32 +20,32 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'domain' => [
|
||||
'description' => __("Your Domain name. You don't need to put http or https in front of your domain in this field. e.g: example.com.", 'wp-ultimo'),
|
||||
'description' => __("Your Domain name. You don't need to put http or https in front of your domain in this field. e.g: example.com.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'blog_id' => [
|
||||
'description' => __('The blog ID attached to this domain.', 'wp-ultimo'),
|
||||
'description' => __('The blog ID attached to this domain.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => true,
|
||||
],
|
||||
'active' => [
|
||||
'description' => __('Set this domain as active (true), which means available to be used, or inactive (false).', 'wp-ultimo'),
|
||||
'description' => __('Set this domain as active (true), which means available to be used, or inactive (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'primary_domain' => [
|
||||
'description' => __("Define true to set this as primary domain of a site, meaning it's the main url, or set false.", 'wp-ultimo'),
|
||||
'description' => __("Define true to set this as primary domain of a site, meaning it's the main url, or set false.", 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'secure' => [
|
||||
'description' => __('If this domain has some SSL security or not.', 'wp-ultimo'),
|
||||
'description' => __('If this domain has some SSL security or not.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'stage' => [
|
||||
'description' => __('The state of the domain model object. Can be one of this options: checking-dns, checking-ssl-cert, done-without-ssl, done and failed.', 'wp-ultimo'),
|
||||
'description' => __('The state of the domain model object. Can be one of this options: checking-dns, checking-ssl-cert, done-without-ssl, done and failed.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
'enum' => [
|
||||
@ -57,22 +57,22 @@ return [
|
||||
],
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Date when the domain was created. If no date is set, the current date and time will be used.', 'wp-ultimo'),
|
||||
'description' => __('Date when the domain was created. If no date is set, the current date and time will be used.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'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,
|
||||
],
|
||||
|
@ -20,32 +20,32 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'domain' => [
|
||||
'description' => __("Your Domain name. You don't need to put http or https in front of your domain in this field. e.g: example.com.", 'wp-ultimo'),
|
||||
'description' => __("Your Domain name. You don't need to put http or https in front of your domain in this field. e.g: example.com.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'blog_id' => [
|
||||
'description' => __('The blog ID attached to this domain.', 'wp-ultimo'),
|
||||
'description' => __('The blog ID attached to this domain.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'active' => [
|
||||
'description' => __('Set this domain as active (true), which means available to be used, or inactive (false).', 'wp-ultimo'),
|
||||
'description' => __('Set this domain as active (true), which means available to be used, or inactive (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'primary_domain' => [
|
||||
'description' => __("Define true to set this as primary domain of a site, meaning it's the main url, or set false.", 'wp-ultimo'),
|
||||
'description' => __("Define true to set this as primary domain of a site, meaning it's the main url, or set false.", 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'secure' => [
|
||||
'description' => __('If this domain has some SSL security or not.', 'wp-ultimo'),
|
||||
'description' => __('If this domain has some SSL security or not.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'stage' => [
|
||||
'description' => __('The state of the domain model object. Can be one of this options: checking-dns, checking-ssl-cert, done-without-ssl, done and failed.', 'wp-ultimo'),
|
||||
'description' => __('The state of the domain model object. Can be one of this options: checking-dns, checking-ssl-cert, done-without-ssl, done and failed.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -57,22 +57,22 @@ return [
|
||||
],
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Date when the domain was created. If no date is set, the current date and time will be used.', 'wp-ultimo'),
|
||||
'description' => __('Date when the domain was created. If no date is set, the current date and time will be used.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'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,
|
||||
],
|
||||
|
@ -20,7 +20,7 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'style' => [
|
||||
'description' => __("The email style. Can be 'html' or 'plain-text'.", 'wp-ultimo'),
|
||||
'description' => __("The email style. Can be 'html' or 'plain-text'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -29,32 +29,32 @@ return [
|
||||
],
|
||||
],
|
||||
'schedule' => [
|
||||
'description' => __('Whether or not this is a scheduled email.', 'wp-ultimo'),
|
||||
'description' => __('Whether or not this is a scheduled email.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'type' => [
|
||||
'description' => __('The type being set.', 'wp-ultimo'),
|
||||
'description' => __('The type being set.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'event' => [
|
||||
'description' => __('The event that needs to be fired for this email to be sent.', 'wp-ultimo'),
|
||||
'description' => __('The event that needs to be fired for this email to be sent.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'send_hours' => [
|
||||
'description' => __('The amount of hours that the email will wait before is sent.', 'wp-ultimo'),
|
||||
'description' => __('The amount of hours that the email will wait before is sent.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'send_days' => [
|
||||
'description' => __('The amount of days that the email will wait before is sent.', 'wp-ultimo'),
|
||||
'description' => __('The amount of days that the email will wait before is sent.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'schedule_type' => [
|
||||
'description' => __("The type of schedule. Can be 'days' or 'hours'.", 'wp-ultimo'),
|
||||
'description' => __("The type of schedule. Can be 'days' or 'hours'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -63,27 +63,27 @@ return [
|
||||
],
|
||||
],
|
||||
'name' => [
|
||||
'description' => __('The name being set as title.', 'wp-ultimo'),
|
||||
'description' => __('The name being set as title.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'custom_sender' => [
|
||||
'description' => __('If has a custom sender.', 'wp-ultimo'),
|
||||
'description' => __('If has a custom sender.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'custom_sender_name' => [
|
||||
'description' => __('The name of the custom sender. E.g. From: John Doe.', 'wp-ultimo'),
|
||||
'description' => __('The name of the custom sender. E.g. From: John Doe.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'custom_sender_email' => [
|
||||
'description' => __('The email of the custom sender. E.g. From: johndoe@gmail.com.', 'wp-ultimo'),
|
||||
'description' => __('The email of the custom sender. E.g. From: johndoe@gmail.com.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'target' => [
|
||||
'description' => __("If we should send this to a customer or to the network admin. Can be 'customer' or 'admin'.", 'wp-ultimo'),
|
||||
'description' => __("If we should send this to a customer or to the network admin. Can be 'customer' or 'admin'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
'enum' => [
|
||||
@ -92,52 +92,52 @@ return [
|
||||
],
|
||||
],
|
||||
'send_copy_to_admin' => [
|
||||
'description' => __('Checks if we should send a copy of the email to the admin.', 'wp-ultimo'),
|
||||
'description' => __('Checks if we should send a copy of the email to the admin.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'active' => [
|
||||
'description' => __('Set this email as active (true), which means available will fire when the event occur, or inactive (false).', 'wp-ultimo'),
|
||||
'description' => __('Set this email as active (true), which means available will fire when the event occur, or inactive (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'legacy' => [
|
||||
'description' => __('Whether or not this is a legacy email.', 'wp-ultimo'),
|
||||
'description' => __('Whether or not this is a legacy email.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'title' => [
|
||||
'description' => __('Post title.', 'wp-ultimo'),
|
||||
'description' => __('Post title.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'content' => [
|
||||
'description' => __('Post content.', 'wp-ultimo'),
|
||||
'description' => __('Post content.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'excerpt' => [
|
||||
'description' => __('Post excerpt.', 'wp-ultimo'),
|
||||
'description' => __('Post excerpt.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Post creation date.', 'wp-ultimo'),
|
||||
'description' => __('Post creation date.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_modified' => [
|
||||
'description' => __('Post last modification date.', 'wp-ultimo'),
|
||||
'description' => __('Post 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,
|
||||
],
|
||||
|
@ -20,7 +20,7 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'style' => [
|
||||
'description' => __("The email style. Can be 'html' or 'plain-text'.", 'wp-ultimo'),
|
||||
'description' => __("The email style. Can be 'html' or 'plain-text'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -29,32 +29,32 @@ return [
|
||||
],
|
||||
],
|
||||
'schedule' => [
|
||||
'description' => __('Whether or not this is a scheduled email.', 'wp-ultimo'),
|
||||
'description' => __('Whether or not this is a scheduled email.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'type' => [
|
||||
'description' => __('The type being set.', 'wp-ultimo'),
|
||||
'description' => __('The type being set.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'event' => [
|
||||
'description' => __('The event that needs to be fired for this email to be sent.', 'wp-ultimo'),
|
||||
'description' => __('The event that needs to be fired for this email to be sent.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'send_hours' => [
|
||||
'description' => __('The amount of hours that the email will wait before is sent.', 'wp-ultimo'),
|
||||
'description' => __('The amount of hours that the email will wait before is sent.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'send_days' => [
|
||||
'description' => __('The amount of days that the email will wait before is sent.', 'wp-ultimo'),
|
||||
'description' => __('The amount of days that the email will wait before is sent.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'schedule_type' => [
|
||||
'description' => __("The type of schedule. Can be 'days' or 'hours'.", 'wp-ultimo'),
|
||||
'description' => __("The type of schedule. Can be 'days' or 'hours'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -63,27 +63,27 @@ return [
|
||||
],
|
||||
],
|
||||
'name' => [
|
||||
'description' => __('The name being set as title.', 'wp-ultimo'),
|
||||
'description' => __('The name being set as title.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'custom_sender' => [
|
||||
'description' => __('If has a custom sender.', 'wp-ultimo'),
|
||||
'description' => __('If has a custom sender.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'custom_sender_name' => [
|
||||
'description' => __('The name of the custom sender. E.g. From: John Doe.', 'wp-ultimo'),
|
||||
'description' => __('The name of the custom sender. E.g. From: John Doe.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'custom_sender_email' => [
|
||||
'description' => __('The email of the custom sender. E.g. From: johndoe@gmail.com.', 'wp-ultimo'),
|
||||
'description' => __('The email of the custom sender. E.g. From: johndoe@gmail.com.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'target' => [
|
||||
'description' => __("If we should send this to a customer or to the network admin. Can be 'customer' or 'admin'.", 'wp-ultimo'),
|
||||
'description' => __("If we should send this to a customer or to the network admin. Can be 'customer' or 'admin'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -92,52 +92,52 @@ return [
|
||||
],
|
||||
],
|
||||
'send_copy_to_admin' => [
|
||||
'description' => __('Checks if we should send a copy of the email to the admin.', 'wp-ultimo'),
|
||||
'description' => __('Checks if we should send a copy of the email to the admin.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'active' => [
|
||||
'description' => __('Set this email as active (true), which means available will fire when the event occur, or inactive (false).', 'wp-ultimo'),
|
||||
'description' => __('Set this email as active (true), which means available will fire when the event occur, or inactive (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'legacy' => [
|
||||
'description' => __('Whether or not this is a legacy email.', 'wp-ultimo'),
|
||||
'description' => __('Whether or not this is a legacy email.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'title' => [
|
||||
'description' => __('Post title.', 'wp-ultimo'),
|
||||
'description' => __('Post title.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'content' => [
|
||||
'description' => __('Post content.', 'wp-ultimo'),
|
||||
'description' => __('Post content.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'excerpt' => [
|
||||
'description' => __('Post excerpt.', 'wp-ultimo'),
|
||||
'description' => __('Post excerpt.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Post creation date.', 'wp-ultimo'),
|
||||
'description' => __('Post creation date.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_modified' => [
|
||||
'description' => __('Post last modification date.', 'wp-ultimo'),
|
||||
'description' => __('Post 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,
|
||||
],
|
||||
|
@ -20,22 +20,22 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'severity' => [
|
||||
'description' => __('Severity of the problem.', 'wp-ultimo'),
|
||||
'description' => __('Severity of the problem.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => true,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Date when the event was created.', 'wp-ultimo'),
|
||||
'description' => __('Date when the event was created.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'payload' => [
|
||||
'description' => __('Payload of the event.', 'wp-ultimo'),
|
||||
'description' => __('Payload of the event.', 'wp-multisite-waas'),
|
||||
'type' => 'object',
|
||||
'required' => true,
|
||||
],
|
||||
'initiator' => [
|
||||
'description' => __('The type of user responsible for initiating the event. There are two options: Manual and System. By default, the event is saved as manual.', 'wp-ultimo'),
|
||||
'description' => __('The type of user responsible for initiating the event. There are two options: Manual and System. By default, the event is saved as manual.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
'enum' => [
|
||||
@ -44,32 +44,32 @@ return [
|
||||
],
|
||||
],
|
||||
'object_type' => [
|
||||
'description' => __("The type of object related to this event. It's usually the model name.", 'wp-ultimo'),
|
||||
'description' => __("The type of object related to this event. It's usually the model name.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'slug' => [
|
||||
'description' => __('The event slug. It needs to be unique and preferably make it clear what it is about. Example: account_created is about creating an account.', 'wp-ultimo'),
|
||||
'description' => __('The event slug. It needs to be unique and preferably make it clear what it is about. Example: account_created is about creating an account.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'object_id' => [
|
||||
'description' => __('The ID of the related objects.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the related objects.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'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,
|
||||
],
|
||||
|
@ -20,22 +20,22 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'severity' => [
|
||||
'description' => __('Severity of the problem.', 'wp-ultimo'),
|
||||
'description' => __('Severity of the problem.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Date when the event was created.', 'wp-ultimo'),
|
||||
'description' => __('Date when the event was created.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'payload' => [
|
||||
'description' => __('Payload of the event.', 'wp-ultimo'),
|
||||
'description' => __('Payload of the event.', 'wp-multisite-waas'),
|
||||
'type' => 'object',
|
||||
'required' => false,
|
||||
],
|
||||
'initiator' => [
|
||||
'description' => __('The type of user responsible for initiating the event. There are two options: Manual and System. By default, the event is saved as manual.', 'wp-ultimo'),
|
||||
'description' => __('The type of user responsible for initiating the event. There are two options: Manual and System. By default, the event is saved as manual.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -44,32 +44,32 @@ return [
|
||||
],
|
||||
],
|
||||
'object_type' => [
|
||||
'description' => __("The type of object related to this event. It's usually the model name.", 'wp-ultimo'),
|
||||
'description' => __("The type of object related to this event. It's usually the model name.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'slug' => [
|
||||
'description' => __('The event slug. It needs to be unique and preferably make it clear what it is about. Example: account_created is about creating an account.', 'wp-ultimo'),
|
||||
'description' => __('The event slug. It needs to be unique and preferably make it clear what it is about. Example: account_created is about creating an account.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'object_id' => [
|
||||
'description' => __('The ID of the related objects.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the related objects.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'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,
|
||||
],
|
||||
|
@ -22,37 +22,37 @@ use WP_Ultimo\Database\Memberships\Membership_Status;
|
||||
*/
|
||||
return [
|
||||
'customer_id' => [
|
||||
'description' => __('The ID of the customer attached to this membership.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the customer attached to this membership.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => true,
|
||||
],
|
||||
'user_id' => [
|
||||
'description' => __('The user ID attached to this membership.', 'wp-ultimo'),
|
||||
'description' => __('The user ID attached to this membership.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'plan_id' => [
|
||||
'description' => __('The plan ID associated with the membership.', 'wp-ultimo'),
|
||||
'description' => __('The plan ID associated with the membership.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => true,
|
||||
],
|
||||
'addon_products' => [
|
||||
'description' => __('Additional products related to this membership. Services, Packages or other types of products.', 'wp-ultimo'),
|
||||
'description' => __('Additional products related to this membership. Services, Packages or other types of products.', 'wp-multisite-waas'),
|
||||
'type' => 'mixed',
|
||||
'required' => false,
|
||||
],
|
||||
'currency' => [
|
||||
'description' => __("The currency that this membership. It's a 3-letter code. E.g. 'USD'.", 'wp-ultimo'),
|
||||
'description' => __("The currency that this membership. It's a 3-letter code. E.g. 'USD'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'duration' => [
|
||||
'description' => __('The interval period between a charge. Only the interval amount, the unit will be defined in another property.', 'wp-ultimo'),
|
||||
'description' => __('The interval period between a charge. Only the interval amount, the unit will be defined in another property.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'duration_unit' => [
|
||||
'description' => __("The duration amount type. Can be 'day', 'week', 'month' or 'year'.", 'wp-ultimo'),
|
||||
'description' => __("The duration amount type. Can be 'day', 'week', 'month' or 'year'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -63,118 +63,118 @@ return [
|
||||
],
|
||||
],
|
||||
'amount' => [
|
||||
'description' => __('The product amount.', 'wp-ultimo'),
|
||||
'description' => __('The product amount.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'initial_amount' => [
|
||||
'description' => __('The initial amount charged for this membership, including the setup fee.', 'wp-ultimo'),
|
||||
'description' => __('The initial amount charged for this membership, including the setup fee.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Date of creation of this membership.', 'wp-ultimo'),
|
||||
'description' => __('Date of creation of this membership.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_activated' => [
|
||||
'description' => __('Date when this membership was activated.', 'wp-ultimo'),
|
||||
'description' => __('Date when this membership was activated.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_trial_end' => [
|
||||
'description' => __('Date when the trial period ends, if this membership has or had a trial period.', 'wp-ultimo'),
|
||||
'description' => __('Date when the trial period ends, if this membership has or had a trial period.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_renewed' => [
|
||||
'description' => __('Date when the membership was cancelled.', 'wp-ultimo'),
|
||||
'description' => __('Date when the membership was cancelled.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_cancellation' => [
|
||||
'description' => __('Date when the membership was cancelled.', 'wp-ultimo'),
|
||||
'description' => __('Date when the membership was cancelled.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_expiration' => [
|
||||
'description' => __('Date when the membership will expiry.', 'wp-ultimo'),
|
||||
'description' => __('Date when the membership will expiry.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_payment_plan_completed' => [
|
||||
'description' => __('Change of the payment completion for the plan value.', 'wp-ultimo'),
|
||||
'description' => __('Change of the payment completion for the plan value.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'auto_renew' => [
|
||||
'description' => __('If this membership should auto-renewal.', 'wp-ultimo'),
|
||||
'description' => __('If this membership should auto-renewal.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'times_billed' => [
|
||||
'description' => __('Amount of times this membership got billed.', 'wp-ultimo'),
|
||||
'description' => __('Amount of times this membership got billed.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'billing_cycles' => [
|
||||
'description' => __('Maximum times we should charge this membership.', 'wp-ultimo'),
|
||||
'description' => __('Maximum times we should charge this membership.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'status' => [
|
||||
'description' => __("The membership status. Can be 'pending', 'active', 'on-hold', 'expired', 'cancelled' or other values added by third-party add-ons.", 'wp-ultimo'),
|
||||
'description' => __("The membership status. Can be 'pending', 'active', 'on-hold', 'expired', 'cancelled' or other values added by third-party add-ons.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => Membership_Status::get_allowed_list(),
|
||||
],
|
||||
'gateway_customer_id' => [
|
||||
'description' => __('The ID of the customer on the payment gateway database.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the customer on the payment gateway database.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'gateway_subscription_id' => [
|
||||
'description' => __('The ID of the subscription on the payment gateway database.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the subscription on the payment gateway database.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'gateway' => [
|
||||
'description' => __('ID of the gateway being used on this subscription.', 'wp-ultimo'),
|
||||
'description' => __('ID of the gateway being used on this subscription.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'signup_method' => [
|
||||
'description' => __('Signup method used to create this membership.', 'wp-ultimo'),
|
||||
'description' => __('Signup method used to create this membership.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'upgraded_from' => [
|
||||
'description' => __('Plan that this membership upgraded from.', 'wp-ultimo'),
|
||||
'description' => __('Plan that this membership upgraded from.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'date_modified' => [
|
||||
'description' => __('Date this membership was last modified.', 'wp-ultimo'),
|
||||
'description' => __('Date this membership was last modified.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'disabled' => [
|
||||
'description' => __('If this membership is a disabled one.', 'wp-ultimo'),
|
||||
'description' => __('If this membership is a disabled one.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'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'),
|
||||
'description' => __('If this membership is recurring (true), which means the customer paid a defined amount each period of time, or not recurring (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'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,
|
||||
],
|
||||
|
@ -22,37 +22,37 @@ use WP_Ultimo\Database\Memberships\Membership_Status;
|
||||
*/
|
||||
return [
|
||||
'customer_id' => [
|
||||
'description' => __('The ID of the customer attached to this membership.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the customer attached to this membership.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'user_id' => [
|
||||
'description' => __('The user ID attached to this membership.', 'wp-ultimo'),
|
||||
'description' => __('The user ID attached to this membership.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'plan_id' => [
|
||||
'description' => __('The plan ID associated with the membership.', 'wp-ultimo'),
|
||||
'description' => __('The plan ID associated with the membership.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'addon_products' => [
|
||||
'description' => __('Additional products related to this membership. Services, Packages or other types of products.', 'wp-ultimo'),
|
||||
'description' => __('Additional products related to this membership. Services, Packages or other types of products.', 'wp-multisite-waas'),
|
||||
'type' => 'mixed',
|
||||
'required' => false,
|
||||
],
|
||||
'currency' => [
|
||||
'description' => __("The currency that this membership. It's a 3-letter code. E.g. 'USD'.", 'wp-ultimo'),
|
||||
'description' => __("The currency that this membership. It's a 3-letter code. E.g. 'USD'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'duration' => [
|
||||
'description' => __('The interval period between a charge. Only the interval amount, the unit will be defined in another property.', 'wp-ultimo'),
|
||||
'description' => __('The interval period between a charge. Only the interval amount, the unit will be defined in another property.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'duration_unit' => [
|
||||
'description' => __("The duration amount type. Can be 'day', 'week', 'month' or 'year'.", 'wp-ultimo'),
|
||||
'description' => __("The duration amount type. Can be 'day', 'week', 'month' or 'year'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -63,118 +63,118 @@ return [
|
||||
],
|
||||
],
|
||||
'amount' => [
|
||||
'description' => __('The product amount.', 'wp-ultimo'),
|
||||
'description' => __('The product amount.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'initial_amount' => [
|
||||
'description' => __('The initial amount charged for this membership, including the setup fee.', 'wp-ultimo'),
|
||||
'description' => __('The initial amount charged for this membership, including the setup fee.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Date of creation of this membership.', 'wp-ultimo'),
|
||||
'description' => __('Date of creation of this membership.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_activated' => [
|
||||
'description' => __('Date when this membership was activated.', 'wp-ultimo'),
|
||||
'description' => __('Date when this membership was activated.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_trial_end' => [
|
||||
'description' => __('Date when the trial period ends, if this membership has or had a trial period.', 'wp-ultimo'),
|
||||
'description' => __('Date when the trial period ends, if this membership has or had a trial period.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_renewed' => [
|
||||
'description' => __('Date when the membership was cancelled.', 'wp-ultimo'),
|
||||
'description' => __('Date when the membership was cancelled.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_cancellation' => [
|
||||
'description' => __('Date when the membership was cancelled.', 'wp-ultimo'),
|
||||
'description' => __('Date when the membership was cancelled.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_expiration' => [
|
||||
'description' => __('Date when the membership will expiry.', 'wp-ultimo'),
|
||||
'description' => __('Date when the membership will expiry.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_payment_plan_completed' => [
|
||||
'description' => __('Change of the payment completion for the plan value.', 'wp-ultimo'),
|
||||
'description' => __('Change of the payment completion for the plan value.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'auto_renew' => [
|
||||
'description' => __('If this membership should auto-renewal.', 'wp-ultimo'),
|
||||
'description' => __('If this membership should auto-renewal.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'times_billed' => [
|
||||
'description' => __('Amount of times this membership got billed.', 'wp-ultimo'),
|
||||
'description' => __('Amount of times this membership got billed.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'billing_cycles' => [
|
||||
'description' => __('Maximum times we should charge this membership.', 'wp-ultimo'),
|
||||
'description' => __('Maximum times we should charge this membership.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'status' => [
|
||||
'description' => __("The membership status. Can be 'pending', 'active', 'on-hold', 'expired', 'cancelled' or other values added by third-party add-ons.", 'wp-ultimo'),
|
||||
'description' => __("The membership status. Can be 'pending', 'active', 'on-hold', 'expired', 'cancelled' or other values added by third-party add-ons.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => Membership_Status::get_allowed_list(),
|
||||
],
|
||||
'gateway_customer_id' => [
|
||||
'description' => __('The ID of the customer on the payment gateway database.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the customer on the payment gateway database.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'gateway_subscription_id' => [
|
||||
'description' => __('The ID of the subscription on the payment gateway database.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the subscription on the payment gateway database.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'gateway' => [
|
||||
'description' => __('ID of the gateway being used on this subscription.', 'wp-ultimo'),
|
||||
'description' => __('ID of the gateway being used on this subscription.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'signup_method' => [
|
||||
'description' => __('Signup method used to create this membership.', 'wp-ultimo'),
|
||||
'description' => __('Signup method used to create this membership.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'upgraded_from' => [
|
||||
'description' => __('Plan that this membership upgraded from.', 'wp-ultimo'),
|
||||
'description' => __('Plan that this membership upgraded from.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'date_modified' => [
|
||||
'description' => __('Date this membership was last modified.', 'wp-ultimo'),
|
||||
'description' => __('Date this membership was last modified.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'disabled' => [
|
||||
'description' => __('If this membership is a disabled one.', 'wp-ultimo'),
|
||||
'description' => __('If this membership is a disabled one.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'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'),
|
||||
'description' => __('If this membership is recurring (true), which means the customer paid a defined amount each period of time, or not recurring (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'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,
|
||||
],
|
||||
|
@ -22,103 +22,103 @@ use WP_Ultimo\Database\Payments\Payment_Status;
|
||||
*/
|
||||
return [
|
||||
'customer_id' => [
|
||||
'description' => __('The ID of the customer attached to this payment.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the customer attached to this payment.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => true,
|
||||
],
|
||||
'membership_id' => [
|
||||
'description' => __('The ID of the membership attached to this payment.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the membership attached to this payment.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => true,
|
||||
],
|
||||
'parent_id' => [
|
||||
'description' => __('The ID from another payment that this payment is related to.', 'wp-ultimo'),
|
||||
'description' => __('The ID from another payment that this payment is related to.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'currency' => [
|
||||
'description' => __("The currency of this payment. It's a 3-letter code. E.g. 'USD'.", 'wp-ultimo'),
|
||||
'description' => __("The currency of this payment. It's a 3-letter code. E.g. 'USD'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'subtotal' => [
|
||||
'description' => __('Value before taxes, discounts, fees and other changes.', 'wp-ultimo'),
|
||||
'description' => __('Value before taxes, discounts, fees and other changes.', 'wp-multisite-waas'),
|
||||
'type' => 'number',
|
||||
'required' => true,
|
||||
],
|
||||
'refund_total' => [
|
||||
'description' => __('Total amount refunded.', 'wp-ultimo'),
|
||||
'description' => __('Total amount refunded.', 'wp-multisite-waas'),
|
||||
'type' => 'number',
|
||||
'required' => false,
|
||||
],
|
||||
'tax_total' => [
|
||||
'description' => __('The amount, in currency, of the tax.', 'wp-ultimo'),
|
||||
'description' => __('The amount, in currency, of the tax.', 'wp-multisite-waas'),
|
||||
'type' => 'number',
|
||||
'required' => false,
|
||||
],
|
||||
'discount_code' => [
|
||||
'description' => __('Discount code used.', 'wp-ultimo'),
|
||||
'description' => __('Discount code used.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'total' => [
|
||||
'description' => __('This takes into account fees, discounts and credits.', 'wp-ultimo'),
|
||||
'description' => __('This takes into account fees, discounts and credits.', 'wp-multisite-waas'),
|
||||
'type' => 'number',
|
||||
'required' => true,
|
||||
],
|
||||
'status' => [
|
||||
'description' => __("The payment status: Can be 'pending', 'completed', 'refunded', 'partially-refunded', 'partially-paid', 'failed', 'cancelled' or other values added by third-party add-ons.", 'wp-ultimo'),
|
||||
'description' => __("The payment status: Can be 'pending', 'completed', 'refunded', 'partially-refunded', 'partially-paid', 'failed', 'cancelled' or other values added by third-party add-ons.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
'enum' => Payment_Status::get_allowed_list(),
|
||||
],
|
||||
'gateway' => [
|
||||
'description' => __('ID of the gateway being used on this payment.', 'wp-ultimo'),
|
||||
'description' => __('ID of the gateway being used on this payment.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'product_id' => [
|
||||
'description' => __('The ID of the product of this payment.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the product of this payment.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'gateway_payment_id' => [
|
||||
'description' => __('The ID of the payment on the gateway, if it exists.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the payment on the gateway, if it exists.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'discount_total' => [
|
||||
'description' => __('The total value of the discounts applied to this payment.', 'wp-ultimo'),
|
||||
'description' => __('The total value of the discounts applied to this payment.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'invoice_number' => [
|
||||
'description' => __('Sequential invoice number assigned to this payment.', 'wp-ultimo'),
|
||||
'description' => __('Sequential invoice number assigned to this payment.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'cancel_membership_on_refund' => [
|
||||
'description' => __('Holds if we need to cancel the membership on refund.', 'wp-ultimo'),
|
||||
'description' => __('Holds if we need to cancel the membership on refund.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Model creation date.', 'wp-ultimo'),
|
||||
'description' => __('Model creation date.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'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,
|
||||
],
|
||||
|
@ -22,103 +22,103 @@ use WP_Ultimo\Database\Payments\Payment_Status;
|
||||
*/
|
||||
return [
|
||||
'customer_id' => [
|
||||
'description' => __('The ID of the customer attached to this payment.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the customer attached to this payment.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'membership_id' => [
|
||||
'description' => __('The ID of the membership attached to this payment.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the membership attached to this payment.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'parent_id' => [
|
||||
'description' => __('The ID from another payment that this payment is related to.', 'wp-ultimo'),
|
||||
'description' => __('The ID from another payment that this payment is related to.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'currency' => [
|
||||
'description' => __("The currency of this payment. It's a 3-letter code. E.g. 'USD'.", 'wp-ultimo'),
|
||||
'description' => __("The currency of this payment. It's a 3-letter code. E.g. 'USD'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'subtotal' => [
|
||||
'description' => __('Value before taxes, discounts, fees and other changes.', 'wp-ultimo'),
|
||||
'description' => __('Value before taxes, discounts, fees and other changes.', 'wp-multisite-waas'),
|
||||
'type' => 'number',
|
||||
'required' => false,
|
||||
],
|
||||
'refund_total' => [
|
||||
'description' => __('Total amount refunded.', 'wp-ultimo'),
|
||||
'description' => __('Total amount refunded.', 'wp-multisite-waas'),
|
||||
'type' => 'number',
|
||||
'required' => false,
|
||||
],
|
||||
'tax_total' => [
|
||||
'description' => __('The amount, in currency, of the tax.', 'wp-ultimo'),
|
||||
'description' => __('The amount, in currency, of the tax.', 'wp-multisite-waas'),
|
||||
'type' => 'number',
|
||||
'required' => false,
|
||||
],
|
||||
'discount_code' => [
|
||||
'description' => __('Discount code used.', 'wp-ultimo'),
|
||||
'description' => __('Discount code used.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'total' => [
|
||||
'description' => __('This takes into account fees, discounts and credits.', 'wp-ultimo'),
|
||||
'description' => __('This takes into account fees, discounts and credits.', 'wp-multisite-waas'),
|
||||
'type' => 'number',
|
||||
'required' => false,
|
||||
],
|
||||
'status' => [
|
||||
'description' => __("The payment status: Can be 'pending', 'completed', 'refunded', 'partially-refunded', 'partially-paid', 'failed', 'cancelled' or other values added by third-party add-ons.", 'wp-ultimo'),
|
||||
'description' => __("The payment status: Can be 'pending', 'completed', 'refunded', 'partially-refunded', 'partially-paid', 'failed', 'cancelled' or other values added by third-party add-ons.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => Payment_Status::get_allowed_list(),
|
||||
],
|
||||
'gateway' => [
|
||||
'description' => __('ID of the gateway being used on this payment.', 'wp-ultimo'),
|
||||
'description' => __('ID of the gateway being used on this payment.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'product_id' => [
|
||||
'description' => __('The ID of the product of this payment.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the product of this payment.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'gateway_payment_id' => [
|
||||
'description' => __('The ID of the payment on the gateway, if it exists.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the payment on the gateway, if it exists.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'discount_total' => [
|
||||
'description' => __('The total value of the discounts applied to this payment.', 'wp-ultimo'),
|
||||
'description' => __('The total value of the discounts applied to this payment.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'invoice_number' => [
|
||||
'description' => __('Sequential invoice number assigned to this payment.', 'wp-ultimo'),
|
||||
'description' => __('Sequential invoice number assigned to this payment.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'cancel_membership_on_refund' => [
|
||||
'description' => __('Holds if we need to cancel the membership on refund.', 'wp-ultimo'),
|
||||
'description' => __('Holds if we need to cancel the membership on refund.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Model creation date.', 'wp-ultimo'),
|
||||
'description' => __('Model creation date.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'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,
|
||||
],
|
||||
|
@ -20,32 +20,32 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'featured_image_id' => [
|
||||
'description' => __('The ID of the feature image of the product.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the feature image of the product.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'slug' => [
|
||||
'description' => __('The product slug. It needs to be unique and preferably make it clear what it is about. Example: my_new_product.', 'wp-ultimo'),
|
||||
'description' => __('The product slug. It needs to be unique and preferably make it clear what it is about. Example: my_new_product.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'name' => [
|
||||
'description' => __('Your product name, which is used as product title as well.', 'wp-ultimo'),
|
||||
'description' => __('Your product name, which is used as product title as well.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'description' => [
|
||||
'description' => __('A description for the product, usually a short text.', 'wp-ultimo'),
|
||||
'description' => __('A description for the product, usually a short text.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'currency' => [
|
||||
'description' => __("The currency that this product accepts. It's a 3-letter code. E.g. 'USD'.", 'wp-ultimo'),
|
||||
'description' => __("The currency that this product accepts. It's a 3-letter code. E.g. 'USD'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'pricing_type' => [
|
||||
'description' => __("The pricing type can be 'free', 'paid' or 'contact_us'.", 'wp-ultimo'),
|
||||
'description' => __("The pricing type can be 'free', 'paid' or 'contact_us'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
'enum' => [
|
||||
@ -55,12 +55,12 @@ return [
|
||||
],
|
||||
],
|
||||
'trial_duration' => [
|
||||
'description' => __('The duration of the trial period of this product, if the product has one.', 'wp-ultimo'),
|
||||
'description' => __('The duration of the trial period of this product, if the product has one.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'trial_duration_unit' => [
|
||||
'description' => __('The unit of the trial duration amount. Can be day, week, month or year.', 'wp-ultimo'),
|
||||
'description' => __('The unit of the trial duration amount. Can be day, week, month or year.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -71,12 +71,12 @@ return [
|
||||
],
|
||||
],
|
||||
'duration' => [
|
||||
'description' => __('Time interval between charges.', 'wp-ultimo'),
|
||||
'description' => __('Time interval between charges.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'duration_unit' => [
|
||||
'description' => __('Time interval unit between charges.', 'wp-ultimo'),
|
||||
'description' => __('Time interval unit between charges.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -87,22 +87,22 @@ return [
|
||||
],
|
||||
],
|
||||
'amount' => [
|
||||
'description' => __('The value of this product. E.g. 19.99.', 'wp-ultimo'),
|
||||
'description' => __('The value of this product. E.g. 19.99.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'setup_fee' => [
|
||||
'description' => __('The setup fee value, if the product has one. E.g. 159.99.', 'wp-ultimo'),
|
||||
'description' => __('The setup fee value, if the product has one. E.g. 159.99.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'active' => [
|
||||
'description' => __('Set this product as active (true), which means available to be used, or inactive (false).', 'wp-ultimo'),
|
||||
'description' => __('Set this product as active (true), which means available to be used, or inactive (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'type' => [
|
||||
'description' => __("The default product types are 'product', 'service' and 'package'. More types can be add using the product type filter.", 'wp-ultimo'),
|
||||
'description' => __("The default product types are 'product', 'service' and 'package'. More types can be add using the product type filter.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
'enum' => [
|
||||
@ -112,87 +112,87 @@ return [
|
||||
],
|
||||
],
|
||||
'parent_id' => [
|
||||
'description' => __('The ID from another Product that this product is related to.', 'wp-ultimo'),
|
||||
'description' => __('The ID from another Product that this product is related to.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'recurring' => [
|
||||
'description' => __('Set this product as a recurring one (true), which means the customer paid a defined amount each period of time, or not recurring (false).', 'wp-ultimo'),
|
||||
'description' => __('Set this product as a recurring one (true), which means the customer paid a defined amount each period of time, or not recurring (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'billing_cycles' => [
|
||||
'description' => __('The number of times we should charge this product.', 'wp-ultimo'),
|
||||
'description' => __('The number of times we should charge this product.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Date when this was created.', 'wp-ultimo'),
|
||||
'description' => __('Date when this was created.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_modified' => [
|
||||
'description' => __('Date when this was last modified.', 'wp-ultimo'),
|
||||
'description' => __('Date when this was last modified.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'taxable' => [
|
||||
'description' => __('Set this product as a taxable one (true), which means tax rules are applied to, or not taxable (false).', 'wp-ultimo'),
|
||||
'description' => __('Set this product as a taxable one (true), which means tax rules are applied to, or not taxable (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'tax_category' => [
|
||||
'description' => __('Category of taxes applied to this product. You need to set this if taxable is set to true.', 'wp-ultimo'),
|
||||
'description' => __('Category of taxes applied to this product. You need to set this if taxable is set to true.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'contact_us_label' => [
|
||||
'description' => __("If the product is the 'contact_us' type, it will need a label for the contact us button.", 'wp-ultimo'),
|
||||
'description' => __("If the product is the 'contact_us' type, it will need a label for the contact us button.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'contact_us_link' => [
|
||||
'description' => __('The url where the contact us button will lead to.', 'wp-ultimo'),
|
||||
'description' => __('The url where the contact us button will lead to.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'feature_list' => [
|
||||
'description' => __('A list (array) of features of the product.', 'wp-ultimo'),
|
||||
'description' => __('A list (array) of features of the product.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'customer_role' => [
|
||||
'description' => __('The customer role of this product.', 'wp-ultimo'),
|
||||
'description' => __('The customer role of this product.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'available_addons' => [
|
||||
'description' => __('The available addons of this product.', 'wp-ultimo'),
|
||||
'description' => __('The available addons of this product.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'group' => [
|
||||
'description' => __('The group of this product, if has any.', 'wp-ultimo'),
|
||||
'description' => __('The group of this product, if has any.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'legacy_options' => [
|
||||
'description' => __('If the legacy options are enabled.', 'wp-ultimo'),
|
||||
'description' => __('If the legacy options are enabled.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'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,
|
||||
],
|
||||
'featured_plan' => [
|
||||
'description' => __('Feature list for pricing tables.', 'wp-ultimo'),
|
||||
'description' => __('Feature list for pricing tables.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
|
@ -20,32 +20,32 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'featured_image_id' => [
|
||||
'description' => __('The ID of the feature image of the product.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the feature image of the product.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'slug' => [
|
||||
'description' => __('The product slug. It needs to be unique and preferably make it clear what it is about. Example: my_new_product.', 'wp-ultimo'),
|
||||
'description' => __('The product slug. It needs to be unique and preferably make it clear what it is about. Example: my_new_product.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'name' => [
|
||||
'description' => __('Your product name, which is used as product title as well.', 'wp-ultimo'),
|
||||
'description' => __('Your product name, which is used as product title as well.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'description' => [
|
||||
'description' => __('A description for the product, usually a short text.', 'wp-ultimo'),
|
||||
'description' => __('A description for the product, usually a short text.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'currency' => [
|
||||
'description' => __("The currency that this product accepts. It's a 3-letter code. E.g. 'USD'.", 'wp-ultimo'),
|
||||
'description' => __("The currency that this product accepts. It's a 3-letter code. E.g. 'USD'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'pricing_type' => [
|
||||
'description' => __("The pricing type can be 'free', 'paid' or 'contact_us'.", 'wp-ultimo'),
|
||||
'description' => __("The pricing type can be 'free', 'paid' or 'contact_us'.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -55,12 +55,12 @@ return [
|
||||
],
|
||||
],
|
||||
'trial_duration' => [
|
||||
'description' => __('The duration of the trial period of this product, if the product has one.', 'wp-ultimo'),
|
||||
'description' => __('The duration of the trial period of this product, if the product has one.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'trial_duration_unit' => [
|
||||
'description' => __('The unit of the trial duration amount. Can be day, week, month or year.', 'wp-ultimo'),
|
||||
'description' => __('The unit of the trial duration amount. Can be day, week, month or year.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -71,12 +71,12 @@ return [
|
||||
],
|
||||
],
|
||||
'duration' => [
|
||||
'description' => __('Time interval between charges.', 'wp-ultimo'),
|
||||
'description' => __('Time interval between charges.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'duration_unit' => [
|
||||
'description' => __('Time interval unit between charges.', 'wp-ultimo'),
|
||||
'description' => __('Time interval unit between charges.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -87,22 +87,22 @@ return [
|
||||
],
|
||||
],
|
||||
'amount' => [
|
||||
'description' => __('The value of this product. E.g. 19.99.', 'wp-ultimo'),
|
||||
'description' => __('The value of this product. E.g. 19.99.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'setup_fee' => [
|
||||
'description' => __('The setup fee value, if the product has one. E.g. 159.99.', 'wp-ultimo'),
|
||||
'description' => __('The setup fee value, if the product has one. E.g. 159.99.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'active' => [
|
||||
'description' => __('Set this product as active (true), which means available to be used, or inactive (false).', 'wp-ultimo'),
|
||||
'description' => __('Set this product as active (true), which means available to be used, or inactive (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'type' => [
|
||||
'description' => __("The default product types are 'product', 'service' and 'package'. More types can be add using the product type filter.", 'wp-ultimo'),
|
||||
'description' => __("The default product types are 'product', 'service' and 'package'. More types can be add using the product type filter.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -112,87 +112,87 @@ return [
|
||||
],
|
||||
],
|
||||
'parent_id' => [
|
||||
'description' => __('The ID from another Product that this product is related to.', 'wp-ultimo'),
|
||||
'description' => __('The ID from another Product that this product is related to.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'recurring' => [
|
||||
'description' => __('Set this product as a recurring one (true), which means the customer paid a defined amount each period of time, or not recurring (false).', 'wp-ultimo'),
|
||||
'description' => __('Set this product as a recurring one (true), which means the customer paid a defined amount each period of time, or not recurring (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'billing_cycles' => [
|
||||
'description' => __('The number of times we should charge this product.', 'wp-ultimo'),
|
||||
'description' => __('The number of times we should charge this product.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Date when this was created.', 'wp-ultimo'),
|
||||
'description' => __('Date when this was created.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_modified' => [
|
||||
'description' => __('Date when this was last modified.', 'wp-ultimo'),
|
||||
'description' => __('Date when this was last modified.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'taxable' => [
|
||||
'description' => __('Set this product as a taxable one (true), which means tax rules are applied to, or not taxable (false).', 'wp-ultimo'),
|
||||
'description' => __('Set this product as a taxable one (true), which means tax rules are applied to, or not taxable (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'tax_category' => [
|
||||
'description' => __('Category of taxes applied to this product. You need to set this if taxable is set to true.', 'wp-ultimo'),
|
||||
'description' => __('Category of taxes applied to this product. You need to set this if taxable is set to true.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'contact_us_label' => [
|
||||
'description' => __("If the product is the 'contact_us' type, it will need a label for the contact us button.", 'wp-ultimo'),
|
||||
'description' => __("If the product is the 'contact_us' type, it will need a label for the contact us button.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'contact_us_link' => [
|
||||
'description' => __('The url where the contact us button will lead to.', 'wp-ultimo'),
|
||||
'description' => __('The url where the contact us button will lead to.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'feature_list' => [
|
||||
'description' => __('A list (array) of features of the product.', 'wp-ultimo'),
|
||||
'description' => __('A list (array) of features of the product.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'customer_role' => [
|
||||
'description' => __('The customer role of this product.', 'wp-ultimo'),
|
||||
'description' => __('The customer role of this product.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'available_addons' => [
|
||||
'description' => __('The available addons of this product.', 'wp-ultimo'),
|
||||
'description' => __('The available addons of this product.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'group' => [
|
||||
'description' => __('The group of this product, if has any.', 'wp-ultimo'),
|
||||
'description' => __('The group of this product, if has any.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'legacy_options' => [
|
||||
'description' => __('If the legacy options are enabled.', 'wp-ultimo'),
|
||||
'description' => __('If the legacy options are enabled.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'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,
|
||||
],
|
||||
'featured_plan' => [
|
||||
'description' => __('Feature list for pricing tables.', 'wp-ultimo'),
|
||||
'description' => __('Feature list for pricing tables.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
|
@ -20,107 +20,107 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'categories' => [
|
||||
'description' => __('The categories this site belongs to.', 'wp-ultimo'),
|
||||
'description' => __('The categories this site belongs to.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'featured_image_id' => [
|
||||
'description' => __('The ID of the feature image of the site.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the feature image of the site.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'site_id' => [
|
||||
'description' => __('The network ID for this site.', 'wp-ultimo'),
|
||||
'description' => __('The network ID for this site.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => true,
|
||||
],
|
||||
'title' => [
|
||||
'description' => __('The site title.', 'wp-ultimo'),
|
||||
'description' => __('The site title.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'name' => [
|
||||
'description' => __('The site name.', 'wp-ultimo'),
|
||||
'description' => __('The site name.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'description' => [
|
||||
'description' => __('A description for the site, usually a short text.', 'wp-ultimo'),
|
||||
'description' => __('A description for the site, usually a short text.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'domain' => [
|
||||
'description' => __("The site domain. You don't need to put http or https in front of your domain in this field. e.g: example.com.", 'wp-ultimo'),
|
||||
'description' => __("The site domain. You don't need to put http or https in front of your domain in this field. e.g: example.com.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'path' => [
|
||||
'description' => __('Path of the site. Used when in sub-directory mode.', 'wp-ultimo'),
|
||||
'description' => __('Path of the site. Used when in sub-directory mode.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'registered' => [
|
||||
'description' => __('Date when the site was registered.', 'wp-ultimo'),
|
||||
'description' => __('Date when the site was registered.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'last_updated' => [
|
||||
'description' => __('Date of the last update on this site.', 'wp-ultimo'),
|
||||
'description' => __('Date of the last update on this site.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'active' => [
|
||||
'description' => __('Holds the ID of the customer that owns this site.', 'wp-ultimo'),
|
||||
'description' => __('Holds the ID of the customer that owns this site.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'public' => [
|
||||
'description' => __('Set true if this site is a public one, false if not.', 'wp-ultimo'),
|
||||
'description' => __('Set true if this site is a public one, false if not.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'archived' => [
|
||||
'description' => __('Is this an archived site.', 'wp-ultimo'),
|
||||
'description' => __('Is this an archived site.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'mature' => [
|
||||
'description' => __('Is this a site with mature content.', 'wp-ultimo'),
|
||||
'description' => __('Is this a site with mature content.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'spam' => [
|
||||
'description' => __('Is this an spam site.', 'wp-ultimo'),
|
||||
'description' => __('Is this an spam site.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'deleted' => [
|
||||
'description' => __('Is this site deleted.', 'wp-ultimo'),
|
||||
'description' => __('Is this site deleted.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'lang_id' => [
|
||||
'description' => __('The ID of the language being used on this site.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the language being used on this site.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'customer_id' => [
|
||||
'description' => __('The ID of the customer that owns this site.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the customer that owns this site.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => true,
|
||||
],
|
||||
'membership_id' => [
|
||||
'description' => __('The ID of the membership associated with this site, if any.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the membership associated with this site, if any.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => true,
|
||||
],
|
||||
'template_id' => [
|
||||
'description' => __('The ID of the templated used to create this site.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the templated used to create this site.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'type' => [
|
||||
'description' => __('The type of this particular site. Can be default, site_template, customer_owned, pending, external, main or other values added by third-party add-ons.', 'wp-ultimo'),
|
||||
'description' => __('The type of this particular site. Can be default, site_template, customer_owned, pending, external, main or other values added by third-party add-ons.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
'enum' => [
|
||||
@ -133,32 +133,32 @@ return [
|
||||
],
|
||||
],
|
||||
'signup_options' => [
|
||||
'description' => __('Keeps signup options for the site.', 'wp-ultimo'),
|
||||
'description' => __('Keeps signup options for the site.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'signup_meta' => [
|
||||
'description' => __('Keeps signup meta for the site.', 'wp-ultimo'),
|
||||
'description' => __('Keeps signup meta for the site.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Model creation date.', 'wp-ultimo'),
|
||||
'description' => __('Model creation date.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'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,
|
||||
],
|
||||
|
@ -20,107 +20,107 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'categories' => [
|
||||
'description' => __('The categories this site belongs to.', 'wp-ultimo'),
|
||||
'description' => __('The categories this site belongs to.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'featured_image_id' => [
|
||||
'description' => __('The ID of the feature image of the site.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the feature image of the site.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'site_id' => [
|
||||
'description' => __('The network ID for this site.', 'wp-ultimo'),
|
||||
'description' => __('The network ID for this site.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'title' => [
|
||||
'description' => __('The site title.', 'wp-ultimo'),
|
||||
'description' => __('The site title.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'name' => [
|
||||
'description' => __('The site name.', 'wp-ultimo'),
|
||||
'description' => __('The site name.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'description' => [
|
||||
'description' => __('A description for the site, usually a short text.', 'wp-ultimo'),
|
||||
'description' => __('A description for the site, usually a short text.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'domain' => [
|
||||
'description' => __("The site domain. You don't need to put http or https in front of your domain in this field. e.g: example.com.", 'wp-ultimo'),
|
||||
'description' => __("The site domain. You don't need to put http or https in front of your domain in this field. e.g: example.com.", 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'path' => [
|
||||
'description' => __('Path of the site. Used when in sub-directory mode.', 'wp-ultimo'),
|
||||
'description' => __('Path of the site. Used when in sub-directory mode.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'registered' => [
|
||||
'description' => __('Date when the site was registered.', 'wp-ultimo'),
|
||||
'description' => __('Date when the site was registered.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'last_updated' => [
|
||||
'description' => __('Date of the last update on this site.', 'wp-ultimo'),
|
||||
'description' => __('Date of the last update on this site.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'active' => [
|
||||
'description' => __('Holds the ID of the customer that owns this site.', 'wp-ultimo'),
|
||||
'description' => __('Holds the ID of the customer that owns this site.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'public' => [
|
||||
'description' => __('Set true if this site is a public one, false if not.', 'wp-ultimo'),
|
||||
'description' => __('Set true if this site is a public one, false if not.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'archived' => [
|
||||
'description' => __('Is this an archived site.', 'wp-ultimo'),
|
||||
'description' => __('Is this an archived site.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'mature' => [
|
||||
'description' => __('Is this a site with mature content.', 'wp-ultimo'),
|
||||
'description' => __('Is this a site with mature content.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'spam' => [
|
||||
'description' => __('Is this an spam site.', 'wp-ultimo'),
|
||||
'description' => __('Is this an spam site.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'deleted' => [
|
||||
'description' => __('Is this site deleted.', 'wp-ultimo'),
|
||||
'description' => __('Is this site deleted.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'lang_id' => [
|
||||
'description' => __('The ID of the language being used on this site.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the language being used on this site.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'customer_id' => [
|
||||
'description' => __('The ID of the customer that owns this site.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the customer that owns this site.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'membership_id' => [
|
||||
'description' => __('The ID of the membership associated with this site, if any.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the membership associated with this site, if any.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'template_id' => [
|
||||
'description' => __('The ID of the templated used to create this site.', 'wp-ultimo'),
|
||||
'description' => __('The ID of the templated used to create this site.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'type' => [
|
||||
'description' => __('The type of this particular site. Can be default, site_template, customer_owned, pending, external, main or other values added by third-party add-ons.', 'wp-ultimo'),
|
||||
'description' => __('The type of this particular site. Can be default, site_template, customer_owned, pending, external, main or other values added by third-party add-ons.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
'enum' => [
|
||||
@ -133,32 +133,32 @@ return [
|
||||
],
|
||||
],
|
||||
'signup_options' => [
|
||||
'description' => __('Keeps signup options for the site.', 'wp-ultimo'),
|
||||
'description' => __('Keeps signup options for the site.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'signup_meta' => [
|
||||
'description' => __('Keeps signup meta for the site.', 'wp-ultimo'),
|
||||
'description' => __('Keeps signup meta for the site.', 'wp-multisite-waas'),
|
||||
'type' => 'array',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Model creation date.', 'wp-ultimo'),
|
||||
'description' => __('Model creation date.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'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,
|
||||
],
|
||||
|
@ -20,62 +20,62 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'name' => [
|
||||
'description' => __('Webhook name, which is used as product title as well.', 'wp-ultimo'),
|
||||
'description' => __('Webhook name, which is used as product title as well.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'webhook_url' => [
|
||||
'description' => __('The URL used for the webhook call.', 'wp-ultimo'),
|
||||
'description' => __('The URL used for the webhook call.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'event' => [
|
||||
'description' => __('The event that needs to be fired for this webhook to be sent.', 'wp-ultimo'),
|
||||
'description' => __('The event that needs to be fired for this webhook to be sent.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'event_count' => [
|
||||
'description' => __('How many times this webhook was sent.', 'wp-ultimo'),
|
||||
'description' => __('How many times this webhook was sent.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'active' => [
|
||||
'description' => __('Set this webhook as active (true), which means available will fire when the event occur, or inactive (false).', 'wp-ultimo'),
|
||||
'description' => __('Set this webhook as active (true), which means available will fire when the event occur, or inactive (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'hidden' => [
|
||||
'description' => __('Is this webhook hidden.', 'wp-ultimo'),
|
||||
'description' => __('Is this webhook hidden.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Date when this was created.', 'wp-ultimo'),
|
||||
'description' => __('Date when this was created.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'integration' => [
|
||||
'description' => __('The integration that created this webhook.', 'wp-ultimo'),
|
||||
'description' => __('The integration that created this webhook.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
],
|
||||
'date_last_failed' => [
|
||||
'description' => __('The date when this webhook last fail.', 'wp-ultimo'),
|
||||
'description' => __('The date when this webhook last fail.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'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,
|
||||
],
|
||||
|
@ -20,62 +20,62 @@ defined('ABSPATH') || exit;
|
||||
*/
|
||||
return [
|
||||
'name' => [
|
||||
'description' => __('Webhook name, which is used as product title as well.', 'wp-ultimo'),
|
||||
'description' => __('Webhook name, which is used as product title as well.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'webhook_url' => [
|
||||
'description' => __('The URL used for the webhook call.', 'wp-ultimo'),
|
||||
'description' => __('The URL used for the webhook call.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'event' => [
|
||||
'description' => __('The event that needs to be fired for this webhook to be sent.', 'wp-ultimo'),
|
||||
'description' => __('The event that needs to be fired for this webhook to be sent.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'event_count' => [
|
||||
'description' => __('How many times this webhook was sent.', 'wp-ultimo'),
|
||||
'description' => __('How many times this webhook was sent.', 'wp-multisite-waas'),
|
||||
'type' => 'integer',
|
||||
'required' => false,
|
||||
],
|
||||
'active' => [
|
||||
'description' => __('Set this webhook as active (true), which means available will fire when the event occur, or inactive (false).', 'wp-ultimo'),
|
||||
'description' => __('Set this webhook as active (true), which means available will fire when the event occur, or inactive (false).', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'hidden' => [
|
||||
'description' => __('Is this webhook hidden.', 'wp-ultimo'),
|
||||
'description' => __('Is this webhook hidden.', 'wp-multisite-waas'),
|
||||
'type' => 'boolean',
|
||||
'required' => false,
|
||||
],
|
||||
'date_created' => [
|
||||
'description' => __('Date when this was created.', 'wp-ultimo'),
|
||||
'description' => __('Date when this was created.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'integration' => [
|
||||
'description' => __('The integration that created this webhook.', 'wp-ultimo'),
|
||||
'description' => __('The integration that created this webhook.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'required' => false,
|
||||
],
|
||||
'date_last_failed' => [
|
||||
'description' => __('The date when this webhook last fail.', 'wp-ultimo'),
|
||||
'description' => __('The date when this webhook last fail.', 'wp-multisite-waas'),
|
||||
'type' => 'string',
|
||||
'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,
|
||||
],
|
||||
|
@ -166,7 +166,7 @@ trait Rest_Api {
|
||||
$item = $this->model_class::get_by_id($request['id']);
|
||||
|
||||
if (empty($item)) {
|
||||
return new \WP_Error("wu_rest_{$this->slug}_invalid_id", __('Item not found.', 'wp-ultimo'), ['status' => 404]);
|
||||
return new \WP_Error("wu_rest_{$this->slug}_invalid_id", __('Item not found.', 'wp-multisite-waas'), ['status' => 404]);
|
||||
}
|
||||
|
||||
return rest_ensure_response($item);
|
||||
@ -218,7 +218,7 @@ trait Rest_Api {
|
||||
}
|
||||
|
||||
if ( ! $saved) {
|
||||
return new \WP_Error("wu_rest_{$this->slug}", __('Something went wrong (Code 1).', 'wp-ultimo'), ['status' => 400]);
|
||||
return new \WP_Error("wu_rest_{$this->slug}", __('Something went wrong (Code 1).', 'wp-multisite-waas'), ['status' => 400]);
|
||||
}
|
||||
|
||||
return rest_ensure_response($item);
|
||||
@ -239,7 +239,7 @@ trait Rest_Api {
|
||||
$item = $this->model_class::get_by_id($id);
|
||||
|
||||
if (empty($item)) {
|
||||
return new \WP_Error("wu_rest_{$this->slug}_invalid_id", __('Item not found.', 'wp-ultimo'), ['status' => 404]);
|
||||
return new \WP_Error("wu_rest_{$this->slug}_invalid_id", __('Item not found.', 'wp-multisite-waas'), ['status' => 404]);
|
||||
}
|
||||
|
||||
$params = array_filter(
|
||||
@ -258,7 +258,7 @@ trait Rest_Api {
|
||||
} else {
|
||||
$error_message = sprintf(
|
||||
/* translators: 1. Object class name; 2. Set method name */
|
||||
__('The %1$s object does not have a %2$s method', 'wp-ultimo'),
|
||||
__('The %1$s object does not have a %2$s method', 'wp-multisite-waas'),
|
||||
get_class($item),
|
||||
$set_method
|
||||
);
|
||||
@ -278,7 +278,7 @@ trait Rest_Api {
|
||||
}
|
||||
|
||||
if ( ! $saved) {
|
||||
return new \WP_Error("wu_rest_{$this->slug}", __('Something went wrong (Code 2).', 'wp-ultimo'));
|
||||
return new \WP_Error("wu_rest_{$this->slug}", __('Something went wrong (Code 2).', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
return rest_ensure_response($item);
|
||||
@ -297,7 +297,7 @@ trait Rest_Api {
|
||||
$item = $this->model_class::get_by_id($request['id']);
|
||||
|
||||
if (empty($item)) {
|
||||
return new \WP_Error("wu_rest_{$this->slug}_invalid_id", __('Item not found.', 'wp-ultimo'), ['status' => 404]);
|
||||
return new \WP_Error("wu_rest_{$this->slug}_invalid_id", __('Item not found.', 'wp-multisite-waas'), ['status' => 404]);
|
||||
}
|
||||
|
||||
$result = $item->delete();
|
||||
|
@ -116,7 +116,7 @@ trait WP_CLI {
|
||||
$sub_command_data['synopsis'][] = [
|
||||
'name' => 'id',
|
||||
'type' => 'positional',
|
||||
'description' => __('The id for the resource.', 'wp-ultimo'),
|
||||
'description' => __('The id for the resource.', 'wp-multisite-waas'),
|
||||
'optional' => false,
|
||||
];
|
||||
}
|
||||
@ -131,7 +131,7 @@ trait WP_CLI {
|
||||
|
||||
$field = [
|
||||
'name' => $name,
|
||||
'description' => wu_get_isset($explanation, 'description', __('No description found.', 'wp-ultimo')),
|
||||
'description' => wu_get_isset($explanation, 'description', __('No description found.', 'wp-multisite-waas')),
|
||||
'optional' => ! wu_get_isset($explanation, 'required'),
|
||||
'type' => 'assoc',
|
||||
];
|
||||
@ -150,7 +150,7 @@ trait WP_CLI {
|
||||
$sub_command_data['synopsis'][] = [
|
||||
'name' => 'porcelain',
|
||||
'type' => 'flag',
|
||||
'description' => __('Output just the id when the operation is successful.', 'wp-ultimo'),
|
||||
'description' => __('Output just the id when the operation is successful.', 'wp-multisite-waas'),
|
||||
'optional' => true,
|
||||
];
|
||||
}
|
||||
@ -159,7 +159,7 @@ trait WP_CLI {
|
||||
$sub_command_data['synopsis'][] = [
|
||||
'name' => 'format',
|
||||
'type' => 'assoc',
|
||||
'description' => __('Render response in a particular format.', 'wp-ultimo'),
|
||||
'description' => __('Render response in a particular format.', 'wp-multisite-waas'),
|
||||
'optional' => true,
|
||||
'default' => 'table',
|
||||
'options' => [
|
||||
@ -175,7 +175,7 @@ trait WP_CLI {
|
||||
$sub_command_data['synopsis'][] = [
|
||||
'name' => 'fields',
|
||||
'type' => 'assoc',
|
||||
'description' => __('Limit response to specific fields. Defaults to id, name', 'wp-ultimo'),
|
||||
'description' => __('Limit response to specific fields. Defaults to id, name', 'wp-multisite-waas'),
|
||||
'optional' => true,
|
||||
'options' => array_merge(['id'], $params),
|
||||
];
|
||||
@ -335,7 +335,7 @@ trait WP_CLI {
|
||||
} else {
|
||||
$error_message = sprintf(
|
||||
/* translators: 1. Object class name; 2. Set method name */
|
||||
__('The %1$s object does not have a %2$s method', 'wp-ultimo'),
|
||||
__('The %1$s object does not have a %2$s method', 'wp-multisite-waas'),
|
||||
get_class($item),
|
||||
$set_method
|
||||
);
|
||||
|
Reference in New Issue
Block a user