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:
David Stone
2025-04-14 11:36:46 -06:00
committed by GitHub
parent a31cfcb565
commit d88e50df38
1087 changed files with 12586 additions and 18535 deletions

View File

@ -502,7 +502,7 @@ class Cart implements \JsonSerializable {
return $this->cart_descriptor;
}
$desc = wu_get_setting('company_name', __('Subscription', 'wp-ultimo'));
$desc = wu_get_setting('company_name', get_network_option(null, 'site_name'));
$products = [];
@ -556,7 +556,7 @@ class Cart implements \JsonSerializable {
$payment = wu_get_payment($payment_id);
if ( ! $payment) {
$this->errors->add('payment_not_found', __('The payment in question was not found.', 'wp-ultimo'));
$this->errors->add('payment_not_found', __('The payment in question was not found.', 'wp-multisite-waas'));
return true;
}
@ -583,7 +583,7 @@ class Cart implements \JsonSerializable {
* a payment can pay it. Let's check for that.
*/
if (empty($this->customer) || $this->customer->get_id() !== $payment->get_customer_id()) {
$this->errors->add('lacks_permission', __('You are not allowed to modify this payment.', 'wp-ultimo'));
$this->errors->add('lacks_permission', __('You are not allowed to modify this payment.', 'wp-multisite-waas'));
return true;
}
@ -594,7 +594,7 @@ class Cart implements \JsonSerializable {
$membership = $payment->get_membership();
if ( ! $membership) {
$this->errors->add('membership_not_found', __('The membership in question was not found.', 'wp-ultimo'));
$this->errors->add('membership_not_found', __('The membership in question was not found.', 'wp-multisite-waas'));
return true;
}
@ -683,7 +683,7 @@ class Cart implements \JsonSerializable {
);
if ( ! in_array($payment->get_status(), $allowed_status, true)) {
$this->errors->add('invalid_status', __('The payment in question has an invalid status.', 'wp-ultimo'));
$this->errors->add('invalid_status', __('The payment in question has an invalid status.', 'wp-multisite-waas'));
return true;
}
@ -742,7 +742,7 @@ class Cart implements \JsonSerializable {
$membership = wu_get_membership($membership_id);
if ( ! $membership) {
$this->errors->add('membership_not_found', __('The membership in question was not found.', 'wp-ultimo'));
$this->errors->add('membership_not_found', __('The membership in question was not found.', 'wp-multisite-waas'));
return true;
}
@ -762,7 +762,7 @@ class Cart implements \JsonSerializable {
* Only the customer that owns a membership can change it.
*/
if (empty($this->customer) || $this->customer->get_id() !== $membership->get_customer_id()) {
$this->errors->add('lacks_permission', __('You are not allowed to modify this membership.', 'wp-ultimo'));
$this->errors->add('lacks_permission', __('You are not allowed to modify this membership.', 'wp-multisite-waas'));
return true;
}
@ -794,7 +794,7 @@ class Cart implements \JsonSerializable {
return false;
}
$this->errors->add('no_changes', __('This cart proposes no changes to the current membership.', 'wp-ultimo'));
$this->errors->add('no_changes', __('This cart proposes no changes to the current membership.', 'wp-multisite-waas'));
return true;
}
@ -816,7 +816,7 @@ class Cart implements \JsonSerializable {
*/
if (empty($this->plan_id)) {
if (count($this->products) === 0) {
$this->errors->add('no_changes', __('This cart proposes no changes to the current membership.', 'wp-ultimo'));
$this->errors->add('no_changes', __('This cart proposes no changes to the current membership.', 'wp-multisite-waas'));
return true;
}
@ -938,7 +938,7 @@ class Cart implements \JsonSerializable {
$this->products = [];
$this->line_items = [];
$this->errors->add('no_changes', __('This cart proposes no changes to the current membership.', 'wp-ultimo'));
$this->errors->add('no_changes', __('This cart proposes no changes to the current membership.', 'wp-multisite-waas'));
return true;
}
@ -1000,13 +1000,13 @@ class Cart implements \JsonSerializable {
$description = sprintf(
// translators: %1$s the duration, and %2$s the duration unit (day, week, month, etc)
_n('%2$s', '%1$s %2$s', $membership->get_duration(), 'wp-ultimo'), // phpcs:ignore
_n('%2$s', '%1$s %2$s', $membership->get_duration(), 'wp-multisite-waas'), // phpcs:ignore
$membership->get_duration(),
wu_get_translatable_string(($membership->get_duration() <= 1 ? $membership->get_duration_unit() : $membership->get_duration_unit() . 's'))
);
// Translators: Placeholder receives the recurring period description
$message = sprintf(__('You already have an active %s agreement.', 'wp-ultimo'), $description);
$message = sprintf(__('You already have an active %s agreement.', 'wp-multisite-waas'), $description);
$this->errors->add('no_changes', $message);
@ -1027,8 +1027,8 @@ class Cart implements \JsonSerializable {
'wu_checkout_credit_line_item_params',
[
'type' => 'credit',
'title' => __('Scheduled Swap Credit', 'wp-ultimo'),
'description' => __('Swap scheduled to next billing cycle.', 'wp-ultimo'),
'title' => __('Scheduled Swap Credit', 'wp-multisite-waas'),
'description' => __('Swap scheduled to next billing cycle.', 'wp-multisite-waas'),
'discountable' => false,
'taxable' => false,
'quantity' => 1,
@ -1222,8 +1222,8 @@ class Cart implements \JsonSerializable {
'wu_checkout_credit_line_item_params',
[
'type' => 'credit',
'title' => __('Credit', 'wp-ultimo'),
'description' => __('Prorated amount based on the previous membership.', 'wp-ultimo'),
'title' => __('Credit', 'wp-multisite-waas'),
'description' => __('Prorated amount based on the previous membership.', 'wp-multisite-waas'),
'discountable' => false,
'taxable' => false,
'quantity' => 1,
@ -1259,7 +1259,7 @@ class Cart implements \JsonSerializable {
if (empty($discount_code)) {
// translators: %s is the coupon code being used, all-caps. e.g. PROMO10OFF
$this->errors->add('discount_code', sprintf(__('The code %s do not exist or is no longer valid.', 'wp-ultimo'), $code));
$this->errors->add('discount_code', sprintf(__('The code %s do not exist or is no longer valid.', 'wp-multisite-waas'), $code));
return false;
}
@ -1340,7 +1340,7 @@ class Cart implements \JsonSerializable {
if ($line_item_interval !== $interval) {
// translators: two intervals
$this->errors->add('wrong', sprintf(__('Interval %1$s and %2$s do not match.', 'wp-ultimo'), $line_item_interval, $interval));
$this->errors->add('wrong', sprintf(__('Interval %1$s and %2$s do not match.', 'wp-multisite-waas'), $line_item_interval, $interval));
return false;
}
@ -1503,7 +1503,7 @@ class Cart implements \JsonSerializable {
$product = is_numeric($product_id_or_slug) ? wu_get_product($product_id_or_slug) : wu_get_product_by_slug($product_id_or_slug);
if ( ! $product) {
$message = __('The product you are trying to add does not exist.', 'wp-ultimo');
$message = __('The product you are trying to add does not exist.', 'wp-multisite-waas');
$this->errors->add('missing-product', $message);
@ -1515,7 +1515,7 @@ class Cart implements \JsonSerializable {
$product = $product->get_as_variation($this->duration, $this->duration_unit);
if ( ! $product) {
$message = __('The product you are trying to add does not exist for the selected duration.', 'wp-ultimo');
$message = __('The product you are trying to add does not exist for the selected duration.', 'wp-multisite-waas');
$this->errors->add('missing-price-variations', $message);
@ -1529,7 +1529,7 @@ class Cart implements \JsonSerializable {
* another one. Bail.
*/
if ( ! empty($this->plan_id)) {
$message = __('Theres already a plan in this membership.', 'wp-ultimo');
$message = __('Theres already a plan in this membership.', 'wp-multisite-waas');
$this->errors->add('plan-already-added', $message);
@ -1591,7 +1591,7 @@ class Cart implements \JsonSerializable {
* price variation. We need to add an error.
*/
// translators: respectively, product name, duration, and duration unit.
$message = sprintf(__('%1$s does not have a valid price variation for that billing period (every %2$s %3$s(s)) and was not added to the cart.', 'wp-ultimo'), $product->get_name(), $this->duration, $this->duration_unit);
$message = sprintf(__('%1$s does not have a valid price variation for that billing period (every %2$s %3$s(s)) and was not added to the cart.', 'wp-multisite-waas'), $product->get_name(), $this->duration, $this->duration_unit);
$this->errors->add('missing-price-variations', $message);
@ -1655,7 +1655,7 @@ class Cart implements \JsonSerializable {
}
// translators: placeholder is the product name.
$description = ($product->get_setup_fee() > 0) ? __('Signup Fee for %s', 'wp-ultimo') : __('Signup Credit for %s', 'wp-ultimo');
$description = ($product->get_setup_fee() > 0) ? __('Signup Fee for %s', 'wp-multisite-waas') : __('Signup Credit for %s', 'wp-multisite-waas');
$description = sprintf($description, $product->get_name());
@ -1830,7 +1830,7 @@ class Cart implements \JsonSerializable {
$where_clauses[] = ['type', $type];
// Cast to array recursively
$line_items = json_decode(json_encode($this->line_items), true);
$line_items = json_decode(wp_json_encode($this->line_items), true);
$line_items = Array_Search::find(
$line_items,
@ -2353,7 +2353,7 @@ class Cart implements \JsonSerializable {
*/
public function jsonSerialize(): string {
return json_encode($this->done());
return wp_json_encode($this->done());
}
/**

View File

@ -108,8 +108,8 @@ class Checkout_Pages {
<div class="misc-pub-section misc-pub-section-last" style="margin-top: 12px; margin-bottom: 6px; display: flex; align-items: center;">
<label for="wu-compat-mode">
<span style="display: block; font-weight: 600; margin-bottom: 3px;"><?php _e('WP Multisite WaaS Compatibility Mode', 'wp-ultimo'); ?></span>
<small style="display: block; line-height: 1.8em;"><?php _e('Toggle this option on if WP Multisite WaaS elements are not loading correctly or at all.', 'wp-ultimo'); ?></small>
<span style="display: block; font-weight: 600; margin-bottom: 3px;"><?php esc_html_e('WP Multisite WaaS Compatibility Mode', 'wp-multisite-waas'); ?></span>
<small style="display: block; line-height: 1.8em;"><?php esc_html_e('Toggle this option on if WP Multisite WaaS elements are not loading correctly or at all.', 'wp-multisite-waas'); ?></small>
</label>
<div style="margin-left: 6px;">
<input id="wu-compat-mode" type="checkbox" value="1" <?php checked($value, true, true); ?> name="_wu_force_elements_loading" />
@ -190,7 +190,7 @@ class Checkout_Pages {
public function get_error_message($error_code, $username = '') {
$messages = [
'incorrect_password' => sprintf(__('<strong>Error:</strong> The password you entered is incorrect.', 'wp-ultimo')),
'incorrect_password' => sprintf(__('<strong>Error:</strong> The password you entered is incorrect.', 'wp-multisite-waas')),
// From here we are using the same messages as WordPress core.
'expired' => __('Your session has expired. Please log in to continue where you left off.'),
'confirm' => sprintf(__('Check your email for the confirmation link, then visit the <a href="%s">login page</a>.'), wp_login_url()),
@ -217,7 +217,7 @@ class Checkout_Pages {
*/
$messages = apply_filters('wu_checkout_pages_error_messages', $messages);
return wu_get_isset($messages, $error_code, __('Something went wrong', 'wp-ultimo'));
return wu_get_isset($messages, $error_code, __('Something went wrong', 'wp-multisite-waas'));
}
/**
@ -243,7 +243,7 @@ class Checkout_Pages {
wp_login_url()
);
wp_redirect($url);
wp_safe_redirect($url);
exit;
}
@ -263,7 +263,7 @@ class Checkout_Pages {
public function maybe_redirect_to_confirm_screen(): void {
if (wu_request('redirect_to')) {
wp_redirect(wu_request('redirect_to'));
wp_safe_redirect(wu_request('redirect_to'));
exit;
}
@ -395,7 +395,7 @@ class Checkout_Pages {
return;
}
wp_redirect($redirect_to);
wp_safe_redirect($redirect_to);
exit;
}
@ -415,9 +415,9 @@ class Checkout_Pages {
if ($payment->get_total() == 0 && $customer->get_email_verification() === 'pending') {
$html = '<div class="wu-p-4 wu-bg-yellow-200 wu-mb-2 wu-text-yellow-700 wu-rounded">%s</div>';
$message = __('Your email address is not yet verified. Your site <strong>will only be activated</strong> after your email address is verified. Check your inbox and verify your email address.', 'wp-ultimo');
$message = __('Your email address is not yet verified. Your site <strong>will only be activated</strong> after your email address is verified. Check your inbox and verify your email address.', 'wp-multisite-waas');
$message .= sprintf('<br><a href="#" class="wu-resend-verification-email wu-text-gray-700">%s</a>', __('Resend verification email &rarr;', 'wp-ultimo'));
$message .= sprintf('<br><a href="#" class="wu-resend-verification-email wu-text-gray-700">%s</a>', __('Resend verification email &rarr;', 'wp-multisite-waas'));
printf($html, $message);
}
@ -472,7 +472,7 @@ class Checkout_Pages {
die;
} else {
wp_redirect($new_login_url);
wp_safe_redirect($new_login_url);
exit;
}
@ -489,7 +489,7 @@ class Checkout_Pages {
$registration_url = $this->get_page_url('register');
if ($registration_url) {
wp_redirect($registration_url);
wp_safe_redirect($registration_url);
exit;
}
@ -618,11 +618,11 @@ class Checkout_Pages {
}
$labels = [
'register' => __('WP Multisite WaaS - Register Page', 'wp-ultimo'),
'login' => __('WP Multisite WaaS - Login Page', 'wp-ultimo'),
'block_frontend' => __('WP Multisite WaaS - Site Blocked Page', 'wp-ultimo'),
'update' => __('WP Multisite WaaS - Membership Update Page', 'wp-ultimo'),
'new_site' => __('WP Multisite WaaS - New Site Page', 'wp-ultimo'),
'register' => __('WP Multisite WaaS - Register Page', 'wp-multisite-waas'),
'login' => __('WP Multisite WaaS - Login Page', 'wp-multisite-waas'),
'block_frontend' => __('WP Multisite WaaS - Site Blocked Page', 'wp-multisite-waas'),
'update' => __('WP Multisite WaaS - Membership Update Page', 'wp-multisite-waas'),
'new_site' => __('WP Multisite WaaS - New Site Page', 'wp-multisite-waas'),
];
$pages = array_map('absint', $this->get_signup_pages());

View File

@ -645,7 +645,7 @@ class Checkout {
if ($cart->should_collect_payment() === false) {
$gateway = wu_get_gateway('free');
} elseif ( ! $gateway || $gateway->get_id() === 'free') {
$this->errors = new \WP_Error('no-gateway', __('Payment gateway not registered.', 'wp-ultimo'));
$this->errors = new \WP_Error('no-gateway', __('Payment gateway not registered.', 'wp-multisite-waas'));
return false;
}
@ -655,7 +655,7 @@ class Checkout {
* we need to bail.
*/
if ( ! $gateway) {
return new \WP_Error('no-gateway', __('Payment gateway not registered.', 'wp-ultimo'));
return new \WP_Error('no-gateway', __('Payment gateway not registered.', 'wp-multisite-waas'));
}
$this->gateway_id = $gateway->get_id();
@ -962,7 +962,7 @@ class Checkout {
'email_verification' => 'verified',
];
} elseif (isset($customer_data['email']) && get_user_by('email', $customer_data['email'])) {
return new \WP_Error('email_exists', __('The email address you entered is already in use.', 'wp-ultimo'));
return new \WP_Error('email_exists', __('The email address you entered is already in use.', 'wp-multisite-waas'));
}
/*
@ -1020,7 +1020,7 @@ class Checkout {
* wrong with the customer update, we return a general error.
*/
if ( ! $address_saved) {
return new \WP_Error('address_failure', __('Something wrong happened while attempting to save the customer billing address', 'wp-ultimo'));
return new \WP_Error('address_failure', __('Something wrong happened while attempting to save the customer billing address', 'wp-multisite-waas'));
}
/*
@ -1549,9 +1549,9 @@ class Checkout {
* Localized strings.
*/
$i18n = [
'loading' => __('Loading...', 'wp-ultimo'),
'added_to_order' => __('The item was added!', 'wp-ultimo'),
'weak_password' => __('The Password entered is too weak.', 'wp-ultimo'),
'loading' => __('Loading...', 'wp-multisite-waas'),
'added_to_order' => __('The item was added!', 'wp-multisite-waas'),
'weak_password' => __('The Password entered is too weak.', 'wp-multisite-waas'),
];
/*
@ -1847,11 +1847,11 @@ class Checkout {
// Add some hidden or compound fields ids
$validation_aliases = array_merge(
[
'password_conf' => __('Password confirmation', 'wp-ultimo'),
'template_id' => __('Template ID', 'wp-ultimo'),
'valid_password' => __('Valid password', 'wp-ultimo'),
'products' => __('Products', 'wp-ultimo'),
'gateway' => __('Payment Gateway', 'wp-ultimo'),
'password_conf' => __('Password confirmation', 'wp-multisite-waas'),
'template_id' => __('Template ID', 'wp-multisite-waas'),
'valid_password' => __('Valid password', 'wp-multisite-waas'),
'products' => __('Products', 'wp-multisite-waas'),
'gateway' => __('Payment Gateway', 'wp-multisite-waas'),
],
$base_aliases
);
@ -1960,7 +1960,7 @@ class Checkout {
/*
* Redirect go burrr!
*/
wp_redirect($redirect_url);
wp_safe_redirect($redirect_url);
exit;
}
@ -2002,7 +2002,7 @@ class Checkout {
*/
$next_step = $this->get_next_step_name();
wp_redirect(add_query_arg('step', $next_step));
wp_safe_redirect(add_query_arg('step', $next_step));
exit;
}
@ -2068,13 +2068,13 @@ class Checkout {
} elseif ($this->order->should_collect_payment() === false) {
$gateway = wu_get_gateway('free');
} elseif ($gateway->get_id() === 'free') {
$this->errors = new \WP_Error('no-gateway', __('Payment gateway not registered.', 'wp-ultimo'));
$this->errors = new \WP_Error('no-gateway', __('Payment gateway not registered.', 'wp-multisite-waas'));
return false;
}
if ( ! $gateway) {
$this->errors = new \WP_Error('no-gateway', __('Payment gateway not registered.', 'wp-ultimo'));
$this->errors = new \WP_Error('no-gateway', __('Payment gateway not registered.', 'wp-multisite-waas'));
return false;
}
@ -2165,13 +2165,13 @@ class Checkout {
);
}
wp_redirect($redirect_url);
wp_safe_redirect($redirect_url);
exit;
} catch (\Throwable $e) {
$membership_id = $this->order->get_membership() ? $this->order->get_membership()->get_id() : 'unknown';
$log_message = sprintf(__('Checkout failed for customer %s: ', 'wp-ultimo'), $membership_id);
$log_message = sprintf(__('Checkout failed for customer %s: ', 'wp-multisite-waas'), $membership_id);
$log_message .= $e->getMessage();
wu_log_add('checkout', $log_message, LogLevel::ERROR);
@ -2286,12 +2286,12 @@ class Checkout {
* @since 2.0.0
*
* @param string $key Key to retrieve the value for.
* @param mixed $default The default value to return, when nothing is found.
* @param mixed $default_value The default value to return, when nothing is found.
* @return mixed
*/
public function request_or_session($key, $default = false) {
public function request_or_session($key, $default_value = false) {
$value = $default;
$value = $default_value;
if (null !== $this->session) {
$session = $this->session->get('signup');

View File

@ -95,7 +95,7 @@ class Legacy_Checkout {
$this->session = wu_get_session('signup');
$this->templates = [
'signup-main.php' => __('WP Multisite WaaS Legacy Signup', 'wp-ultimo'),
'signup-main.php' => __('WP Multisite WaaS Legacy Signup', 'wp-multisite-waas'),
];
// add_filter('request', array($this, 'maybe_render_legacy_signup'));
@ -388,7 +388,7 @@ class Legacy_Checkout {
if (isset($location['country']) && $location['country'] && $allowed_countries) {
if ( ! in_array($location['country'], $allowed_countries, true)) {
wp_die(apply_filters('wu_geolocation_error_message', __('Sorry. Our service is not allowed in your country.', 'wp-ultimo')));
wp_die(apply_filters('wu_geolocation_error_message', __('Sorry. Our service is not allowed in your country.', 'wp-multisite-waas')));
}
}
}
@ -630,8 +630,8 @@ class Legacy_Checkout {
// Plan Selector
$steps['plan'] = [
'name' => __('Pick a Plan', 'wp-ultimo'),
'desc' => __('Which one of our amazing plans you want to get?', 'wp-ultimo'),
'name' => __('Pick a Plan', 'wp-multisite-waas'),
'desc' => __('Which one of our amazing plans you want to get?', 'wp-multisite-waas'),
'view' => 'step-plans',
'handler' => [$this, 'plans_save'],
'order' => 10,
@ -646,8 +646,8 @@ class Legacy_Checkout {
// We add template selection if this has template
if ($site_templates) {
$steps['template'] = [
'name' => __('Template Selection', 'wp-ultimo'),
'desc' => __('Select the base template of your new site.', 'wp-ultimo'),
'name' => __('Template Selection', 'wp-multisite-waas'),
'desc' => __('Select the base template of your new site.', 'wp-multisite-waas'),
'view' => 'step-template',
'order' => 20,
'handler' => false,
@ -657,8 +657,8 @@ class Legacy_Checkout {
// Domain registering
$steps['domain'] = [
'name' => __('Site Details', 'wp-ultimo'),
'desc' => __('Ok, now it\'s time to pick your site url and title!', 'wp-ultimo'),
'name' => __('Site Details', 'wp-multisite-waas'),
'desc' => __('Ok, now it\'s time to pick your site url and title!', 'wp-multisite-waas'),
'handler' => [$this, 'domain_save'],
'view' => false,
'order' => 30,
@ -668,34 +668,34 @@ class Legacy_Checkout {
[
'blog_title' => [
'order' => 10,
'name' => apply_filters('wu_signup_site_title_label', __('Site Title', 'wp-ultimo')),
'name' => apply_filters('wu_signup_site_title_label', __('Site Title', 'wp-multisite-waas')),
'type' => 'text',
'default' => '',
'placeholder' => '',
'tooltip' => apply_filters('wu_signup_site_title_tooltip', __('Select the title your site is going to have.', 'wp-ultimo')),
'tooltip' => apply_filters('wu_signup_site_title_tooltip', __('Select the title your site is going to have.', 'wp-multisite-waas')),
'required' => true,
'core' => true,
],
'blogname' => [
'order' => 20,
'name' => apply_filters('wu_signup_site_url_label', __('URL', 'wp-ultimo')),
'name' => apply_filters('wu_signup_site_url_label', __('URL', 'wp-multisite-waas')),
'type' => 'text',
'default' => '',
'placeholder' => '',
'tooltip' => apply_filters('wu_signup_site_url_tooltip', __('Site urls can only contain lowercase letters (a-z) and numbers and must be at least 4 characters. .', 'wp-ultimo')),
'tooltip' => apply_filters('wu_signup_site_url_tooltip', __('Site urls can only contain lowercase letters (a-z) and numbers and must be at least 4 characters. .', 'wp-multisite-waas')),
'required' => true,
'core' => true,
],
'url_preview' => [
'order' => 30,
'name' => __('Site URL Preview', 'wp-ultimo'),
'name' => __('Site URL Preview', 'wp-multisite-waas'),
'type' => 'html',
'content' => wu_get_template_contents('legacy/signup/steps/step-domain-url-preview'),
],
'submit' => [
'order' => 100,
'type' => 'submit',
'name' => __('Continue to the next step', 'wp-ultimo'),
'name' => __('Continue to the next step', 'wp-multisite-waas'),
'core' => true,
],
]
@ -710,18 +710,18 @@ class Legacy_Checkout {
'user_name' => [
'order' => 10,
'name' => apply_filters('wu_signup_username_label', __('Username', 'wp-ultimo')),
'name' => apply_filters('wu_signup_username_label', __('Username', 'wp-multisite-waas')),
'type' => 'text',
'default' => '',
'placeholder' => '',
'tooltip' => apply_filters('wu_signup_username_tooltip', __('Username must be at least 4 characters.', 'wp-ultimo')),
'tooltip' => apply_filters('wu_signup_username_tooltip', __('Username must be at least 4 characters.', 'wp-multisite-waas')),
'required' => true,
'core' => true,
],
'user_email' => [
'order' => 20,
'name' => apply_filters('wu_signup_email_label', __('Email', 'wp-ultimo')),
'name' => apply_filters('wu_signup_email_label', __('Email', 'wp-multisite-waas')),
'type' => 'email',
'default' => '',
'placeholder' => '',
@ -732,18 +732,18 @@ class Legacy_Checkout {
'user_pass' => [
'order' => 30,
'name' => apply_filters('wu_signup_password_label', __('Password', 'wp-ultimo')),
'name' => apply_filters('wu_signup_password_label', __('Password', 'wp-multisite-waas')),
'type' => 'password',
'default' => '',
'placeholder' => '',
'tooltip' => apply_filters('wu_signup_password_tooltip', __('Your password should be at least 6 characters long.', 'wp-ultimo')),
'tooltip' => apply_filters('wu_signup_password_tooltip', __('Your password should be at least 6 characters long.', 'wp-multisite-waas')),
'required' => true,
'core' => true,
],
'user_pass_conf' => [
'order' => 40,
'name' => apply_filters('wu_signup_password_conf_label', __('Confirm Password', 'wp-ultimo')),
'name' => apply_filters('wu_signup_password_conf_label', __('Confirm Password', 'wp-multisite-waas')),
'type' => 'password',
'default' => '',
'placeholder' => '',
@ -757,7 +757,7 @@ class Legacy_Checkout {
*/
'site_url' => [
'order' => random_int(1, 59), // Use random order for Honeypot
'name' => __('Site URL', 'wp-ultimo'),
'name' => __('Site URL', 'wp-multisite-waas'),
'type' => 'text',
'default' => '',
'placeholder' => '',
@ -786,18 +786,18 @@ class Legacy_Checkout {
// $account_fields['has_coupon'] = array(
// 'order' => 50,
// 'type' => 'checkbox',
// 'name' => __('Have a coupon code?', 'wp-ultimo'),
// 'name' => __('Have a coupon code?', 'wp-multisite-waas'),
// 'core' => true,
// 'check_if' => 'coupon', // Check if the input with this name is selected
// 'checked' => $coupon ? true : false,
// );
// $account_fields['coupon'] = array(
// 'order' => 60,
// 'name' => __('Coupon Code', 'wp-ultimo'),
// 'name' => __('Coupon Code', 'wp-multisite-waas'),
// 'type' => 'text',
// 'default' => '',
// 'placeholder' => '',
// 'tooltip' => __('The code should be an exact match. This field is case-sensitive.', 'wp-ultimo'),
// 'tooltip' => __('The code should be an exact match. This field is case-sensitive.', 'wp-multisite-waas'),
// 'requires' => array('has_coupon' => true),
// 'core' => true,
// );
@ -811,7 +811,7 @@ class Legacy_Checkout {
// 'order' => 70,
// 'type' => 'checkbox',
// 'checked' => false,
// 'name' => sprintf(__('I agree with the <a href="%s" target="_blank">Terms of Service</a>', 'wp-ultimo'), $this->get_terms_url()),
// 'name' => sprintf(__('I agree with the <a href="%s" target="_blank">Terms of Service</a>', 'wp-multisite-waas'), $this->get_terms_url()),
// 'core' => true,
// );
// }
@ -822,13 +822,13 @@ class Legacy_Checkout {
$account_fields['submit'] = [
'order' => 100,
'type' => 'submit',
'name' => __('Create Account', 'wp-ultimo'),
'name' => __('Create Account', 'wp-multisite-waas'),
'core' => true,
];
// Account registering
$steps['account'] = [
'name' => __('Account Details', 'wp-ultimo'),
'name' => __('Account Details', 'wp-multisite-waas'),
'view' => false,
'handler' => [$this, 'account_save'],
'order' => 40,
@ -867,7 +867,7 @@ class Legacy_Checkout {
*/
$begin_signup = [
'begin-signup' => [
'name' => __('Begin Signup Process', 'wp-ultimo'),
'name' => __('Begin Signup Process', 'wp-multisite-waas'),
'handler' => [$this, 'begin_signup'],
'view' => false,
'hidden' => true,
@ -883,7 +883,7 @@ class Legacy_Checkout {
*/
$create_account = [
'create-account' => [
'name' => __('Creating Account', 'wp-ultimo'),
'name' => __('Creating Account', 'wp-multisite-waas'),
'handler' => [$this, 'create_account'],
'view' => false,
'hidden' => true,
@ -932,7 +932,7 @@ class Legacy_Checkout {
if ($die && empty($transient)) {
// wp_die(__('Try again', 'wp-ultimo'));
// wp_die(__('Try again', 'wp-multisite-waas'));
}
if (is_null($transient)) {
@ -959,7 +959,7 @@ class Legacy_Checkout {
public function has_plan_step(): bool {
$transient = static::get_transient();
return !(isset($transient['skip_plan']) && isset($transient['plan_id']) && isset($transient['plan_freq']));
return ! (isset($transient['skip_plan']) && isset($transient['plan_id']) && isset($transient['plan_freq']));
}
/**
@ -1018,7 +1018,7 @@ class Legacy_Checkout {
public function next_step($args = []): void {
/** Redirect the user to the next step */
wp_redirect(esc_url_raw($this->get_next_step_link($args)));
wp_safe_redirect(esc_url_raw($this->get_next_step_link($args)));
/** Kill the execution after the redirect */
exit;
@ -1161,13 +1161,13 @@ class Legacy_Checkout {
// We need now to check for plan
if ( ! isset($_POST['plan_id'])) {
$this->results['errors']->add('plan_id', __('You don\'t have any plan selected.', 'wp-ultimo'));
$this->results['errors']->add('plan_id', __('You don\'t have any plan selected.', 'wp-multisite-waas'));
} else {
// We need now to check if the plan exists
$plan = wu_get_product($_POST['plan_id']);
if ( ! $plan->exists()) {
$this->results['errors']->add('plan_id', __('The plan you\'ve selected doesn\'t exist.', 'wp-ultimo'));
$this->results['errors']->add('plan_id', __('The plan you\'ve selected doesn\'t exist.', 'wp-multisite-waas'));
}
}
@ -1328,7 +1328,7 @@ class Legacy_Checkout {
// Checks for honey-trap id
if ('site_url' === $id) {
wp_die(__('Please, do not use the "site_url" as one of your custom fields\' ids. We use it as a honeytrap field to prevent spam registration. Consider alternatives such as "url" or "website".', 'wp-ultimo'));
wp_die(__('Please, do not use the "site_url" as one of your custom fields\' ids. We use it as a honeytrap field to prevent spam registration. Consider alternatives such as "url" or "website".', 'wp-multisite-waas'));
}
// Saves the order

View File

@ -1079,6 +1079,13 @@ class Line_Item implements \JsonSerializable {
$this->tax_label = $tax_label;
}
/**
* @return string
*/
public function get_date_created(): string {
return $this->date_created;
}
/**
* Returns the amount recurring in a human-friendly way.
*
@ -1093,7 +1100,7 @@ class Line_Item implements \JsonSerializable {
$description = sprintf(
// translators: %1$s the duration, and %2$s the duration unit (day, week, month, etc)
_n('%2$s', 'every %1$s %2$s', $this->get_duration(), 'wp-ultimo'), // phpcs:ignore
_n('%2$s', 'every %1$s %2$s', $this->get_duration(), 'wp-multisite-waas'), // phpcs:ignore
$this->get_duration(),
wu_get_translatable_string(($this->get_duration() <= 1 ? $this->get_duration_unit() : $this->get_duration_unit() . 's'))
);
@ -1164,7 +1171,7 @@ class Line_Item implements \JsonSerializable {
}
// phpcs:disable;
$query = $wpdb->prepare("
$query = $wpdb->prepare( "
SELECT m.wu_payment_id, m.meta_value as line_items, p.date_created
FROM {$wpdb->base_prefix}wu_paymentmeta as m
JOIN {$wpdb->base_prefix}wu_payments as p

View File

@ -308,7 +308,7 @@ abstract class Base_Signup_Field {
$final_field_list[ '_site_notice_field_' . uniqid() ] = [
'type' => 'note',
'classes' => 'wu--mt-px',
'desc' => sprintf('<div class="wu-p-4 wu--m-4 wu-bg-blue-100 wu-text-blue-600 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-300 wu-border-solid">%s</div>', __('This is a site-related field. For that reason, this field will not show up when no plans are present on the shopping cart.', 'wp-ultimo')),
'desc' => sprintf('<div class="wu-p-4 wu--m-4 wu-bg-blue-100 wu-text-blue-600 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-300 wu-border-solid">%s</div>', __('This is a site-related field. For that reason, this field will not show up when no plans are present on the shopping cart.', 'wp-multisite-waas')),
'order' => 98.5,
];
}
@ -320,7 +320,7 @@ abstract class Base_Signup_Field {
$final_field_list[ '_user_notice_field_' . uniqid() ] = [
'type' => 'note',
'classes' => 'wu--mt-px',
'desc' => sprintf('<div class="wu-p-4 wu--m-4 wu-bg-blue-100 wu-text-blue-600 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-300 wu-border-solid">%s</div>', __('This is a customer-related field. For that reason, this field will not show up when the user is logged and already has a customer on file.', 'wp-ultimo')),
'desc' => sprintf('<div class="wu-p-4 wu--m-4 wu-bg-blue-100 wu-text-blue-600 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-300 wu-border-solid">%s</div>', __('This is a customer-related field. For that reason, this field will not show up when the user is logged and already has a customer on file.', 'wp-multisite-waas')),
'order' => 98.5,
];
}
@ -360,7 +360,7 @@ abstract class Base_Signup_Field {
$selected = array_filter($selected);
$field['html_attr']['data-selected'] = json_encode($selected);
$field['html_attr']['data-selected'] = wp_json_encode($selected);
}
}
@ -440,10 +440,10 @@ abstract class Base_Signup_Field {
$fields['id'] = [
'type' => 'text',
'title' => __('Field ID', 'wp-ultimo'),
'placeholder' => __('e.g. info-name', 'wp-ultimo'),
'tooltip' => __('Only alpha-numeric and hyphens allowed.', 'wp-ultimo'),
'desc' => __('The ID of the field. This is used to reference the field.', 'wp-ultimo'),
'title' => __('Field ID', 'wp-multisite-waas'),
'placeholder' => __('e.g. info-name', 'wp-multisite-waas'),
'tooltip' => __('Only alpha-numeric and hyphens allowed.', 'wp-multisite-waas'),
'desc' => __('The ID of the field. This is used to reference the field.', 'wp-multisite-waas'),
'value' => wu_request('id', ''),
'html_attr' => [
'v-on:input' => 'id = $event.target.value.toLowerCase().replace(/[^a-z0-9-_]+/g, "")',
@ -453,10 +453,10 @@ abstract class Base_Signup_Field {
$fields['name'] = [
'type' => 'text',
'title' => __('Field Label', 'wp-ultimo'),
'placeholder' => __('e.g. Your Name', 'wp-ultimo'),
'desc' => __('This is what your customer see as the field title.', 'wp-ultimo'),
'tooltip' => __('Leave blank to hide the field label. You can also set a placeholder value and tip in the "Additional Settings" tab.', 'wp-ultimo'),
'title' => __('Field Label', 'wp-multisite-waas'),
'placeholder' => __('e.g. Your Name', 'wp-multisite-waas'),
'desc' => __('This is what your customer see as the field title.', 'wp-multisite-waas'),
'tooltip' => __('Leave blank to hide the field label. You can also set a placeholder value and tip in the "Additional Settings" tab.', 'wp-multisite-waas'),
'value' => '',
'html_attr' => [
'v-model' => 'name',
@ -465,9 +465,9 @@ abstract class Base_Signup_Field {
$fields['placeholder'] = [
'type' => 'text',
'title' => __('Field Placeholder', 'wp-ultimo'),
'placeholder' => __('e.g. Placeholder value', 'wp-ultimo'),
'desc' => __('This value appears inside the field, as an example of how to fill it.', 'wp-ultimo'),
'title' => __('Field Placeholder', 'wp-multisite-waas'),
'placeholder' => __('e.g. Placeholder value', 'wp-multisite-waas'),
'desc' => __('This value appears inside the field, as an example of how to fill it.', 'wp-multisite-waas'),
'tooltip' => '',
'value' => '',
'tab' => 'advanced',
@ -478,10 +478,10 @@ abstract class Base_Signup_Field {
$fields['tooltip'] = [
'type' => 'textarea',
'title' => __('Field Tooltip', 'wp-ultimo'),
'placeholder' => __('e.g. This field is great, be sure to fill it.', 'wp-ultimo'),
'title' => __('Field Tooltip', 'wp-multisite-waas'),
'placeholder' => __('e.g. This field is great, be sure to fill it.', 'wp-multisite-waas'),
// translators: %is is the icon for a question mark.
'desc' => sprintf(__('Any text entered here will be shown when the customer hovers the %s icon next to the field label.', 'wp-ultimo'), wu_tooltip(__('Just like this!', 'wp-ultimo'))),
'desc' => sprintf(__('Any text entered here will be shown when the customer hovers the %s icon next to the field label.', 'wp-multisite-waas'), wu_tooltip(__('Just like this!', 'wp-multisite-waas'))),
'tooltip' => '',
'value' => '',
'tab' => 'advanced',
@ -493,8 +493,8 @@ abstract class Base_Signup_Field {
$fields['default_value'] = [
'type' => 'text',
'title' => __('Default Value', 'wp-ultimo'),
'placeholder' => __('e.g. None', 'wp-ultimo'),
'title' => __('Default Value', 'wp-multisite-waas'),
'placeholder' => __('e.g. None', 'wp-multisite-waas'),
'value' => '',
'html_attr' => [
'v-model' => 'default_value',
@ -503,7 +503,7 @@ abstract class Base_Signup_Field {
$fields['note'] = [
'type' => 'textarea',
'title' => __('Content', 'wp-ultimo'),
'title' => __('Content', 'wp-multisite-waas'),
'placeholder' => '',
'tooltip' => '',
'value' => '',
@ -514,13 +514,13 @@ abstract class Base_Signup_Field {
$fields['limits'] = [
'type' => 'group',
'title' => __('Field Length', 'wp-ultimo'),
'title' => __('Field Length', 'wp-multisite-waas'),
'tooltip' => '',
'fields' => [
'min' => [
'type' => 'number',
'value' => '',
'placeholder' => __('Min', 'wp-ultimo'),
'placeholder' => __('Min', 'wp-multisite-waas'),
'wrapper_classes' => 'wu-w-1/2',
'html_attr' => [
'v-model' => 'min',
@ -529,7 +529,7 @@ abstract class Base_Signup_Field {
'max' => [
'type' => 'number',
'value' => '',
'placeholder' => __('Max', 'wp-ultimo'),
'placeholder' => __('Max', 'wp-multisite-waas'),
'wrapper_classes' => 'wu-ml-2 wu-w-1/2',
'html_attr' => [
'v-model' => 'max',
@ -540,18 +540,18 @@ abstract class Base_Signup_Field {
$fields['save_as'] = [
'type' => 'select',
'title' => __('Save As', 'wp-ultimo'),
'desc' => __('Select how you want to save this piece of meta data. You can attach it to the customer or the site as site meta or as site option.', 'wp-ultimo'),
'title' => __('Save As', 'wp-multisite-waas'),
'desc' => __('Select how you want to save this piece of meta data. You can attach it to the customer or the site as site meta or as site option.', 'wp-multisite-waas'),
'placeholder' => '',
'tooltip' => '',
'value' => 'customer_meta',
'order' => 99.5,
'options' => [
'customer_meta' => __('Customer Meta', 'wp-ultimo'),
'user_meta' => __('User Meta', 'wp-ultimo'),
'site_meta' => __('Site Meta', 'wp-ultimo'),
'site_option' => __('Site Option', 'wp-ultimo'),
'nothing' => __('Do not save', 'wp-ultimo'),
'customer_meta' => __('Customer Meta', 'wp-multisite-waas'),
'user_meta' => __('User Meta', 'wp-multisite-waas'),
'site_meta' => __('Site Meta', 'wp-multisite-waas'),
'site_option' => __('Site Option', 'wp-multisite-waas'),
'nothing' => __('Do not save', 'wp-multisite-waas'),
],
'html_attr' => [
'v-model' => 'save_as',
@ -560,8 +560,8 @@ abstract class Base_Signup_Field {
$fields['required'] = [
'type' => 'toggle',
'title' => __('Required', 'wp-ultimo'),
'desc' => __('Mark this field as required. The checkout will not proceed unless this field is filled.', 'wp-ultimo'),
'title' => __('Required', 'wp-multisite-waas'),
'desc' => __('Mark this field as required. The checkout will not proceed unless this field is filled.', 'wp-multisite-waas'),
'value' => 0,
'order' => 98,
'html_attr' => [

View File

@ -69,7 +69,7 @@ class Signup_Field_Billing_Address extends Base_Signup_Field {
*/
public function get_title() {
return __('Address', 'wp-ultimo');
return __('Address', 'wp-multisite-waas');
}
/**
@ -82,7 +82,7 @@ class Signup_Field_Billing_Address extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds billing address fields such as country, zip code.', 'wp-ultimo');
return __('Adds billing address fields such as country, zip code.', 'wp-multisite-waas');
}
/**
@ -95,7 +95,7 @@ class Signup_Field_Billing_Address extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds billing address fields such as country, zip code.', 'wp-ultimo');
return __('Adds billing address fields such as country, zip code.', 'wp-multisite-waas');
}
/**
@ -165,8 +165,8 @@ class Signup_Field_Billing_Address extends Base_Signup_Field {
return [
'zip_and_country' => [
'type' => 'toggle',
'title' => __('Display only ZIP and Country?', 'wp-ultimo'),
'desc' => __('Checking this option will only add the ZIP and country fields, instead of all the normal billing address fields.', 'wp-ultimo'),
'title' => __('Display only ZIP and Country?', 'wp-multisite-waas'),
'desc' => __('Checking this option will only add the ZIP and country fields, instead of all the normal billing address fields.', 'wp-multisite-waas'),
'value' => true,
],
];

View File

@ -69,7 +69,7 @@ class Signup_Field_Checkbox extends Base_Signup_Field {
*/
public function get_title() {
return __('Checkbox', 'wp-ultimo');
return __('Checkbox', 'wp-multisite-waas');
}
/**
@ -82,7 +82,7 @@ class Signup_Field_Checkbox extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a checkout box that can be checked by the customer.', 'wp-ultimo');
return __('Adds a checkout box that can be checked by the customer.', 'wp-multisite-waas');
}
/**
@ -95,7 +95,7 @@ class Signup_Field_Checkbox extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a checkout box that can be checked by the customer.', 'wp-ultimo');
return __('Adds a checkout box that can be checked by the customer.', 'wp-multisite-waas');
}
/**
@ -166,8 +166,8 @@ class Signup_Field_Checkbox extends Base_Signup_Field {
return [
'default_state' => [
'type' => 'toggle',
'title' => __('Default State', 'wp-ultimo'),
'desc' => __('Use the toggle to the set the default state of the checkbox.', 'wp-ultimo'),
'title' => __('Default State', 'wp-multisite-waas'),
'desc' => __('Use the toggle to the set the default state of the checkbox.', 'wp-multisite-waas'),
'value' => 0,
'order' => 12,
],

View File

@ -55,7 +55,7 @@ class Signup_Field_Color extends Base_Signup_Field {
*/
public function get_title() {
return __('Color', 'wp-ultimo');
return __('Color', 'wp-multisite-waas');
}
/**
@ -68,7 +68,7 @@ class Signup_Field_Color extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a color picker field.', 'wp-ultimo');
return __('Adds a color picker field.', 'wp-multisite-waas');
}
/**
@ -81,7 +81,7 @@ class Signup_Field_Color extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a color picker field.', 'wp-ultimo');
return __('Adds a color picker field.', 'wp-multisite-waas');
}
/**
@ -154,8 +154,8 @@ class Signup_Field_Color extends Base_Signup_Field {
'default_value' => [
'type' => 'color-picker',
'order' => 12,
'title' => __('Default Color', 'wp-ultimo'),
'desc' => __('Set the default value for this color field.', 'wp-ultimo'),
'title' => __('Default Color', 'wp-multisite-waas'),
'desc' => __('Set the default value for this color field.', 'wp-multisite-waas'),
],
];
}

View File

@ -55,7 +55,7 @@ class Signup_Field_Discount_Code extends Base_Signup_Field {
*/
public function get_title() {
return __('Coupon Code', 'wp-ultimo');
return __('Coupon Code', 'wp-multisite-waas');
}
/**
@ -68,7 +68,7 @@ class Signup_Field_Discount_Code extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds an additional field to apply a discount code.', 'wp-ultimo');
return __('Adds an additional field to apply a discount code.', 'wp-multisite-waas');
}
/**
@ -81,7 +81,7 @@ class Signup_Field_Discount_Code extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds an additional field to apply a discount code.', 'wp-ultimo');
return __('Adds an additional field to apply a discount code.', 'wp-multisite-waas');
}
/**
@ -168,7 +168,7 @@ class Signup_Field_Discount_Code extends Base_Signup_Field {
$checkout_fields['discount_code_checkbox'] = [
'id' => 'discount_code',
'type' => 'toggle',
'name' => __('Have a coupon code?', 'wp-ultimo'),
'name' => __('Have a coupon code?', 'wp-multisite-waas'),
'class' => 'wu-w-auto',
'html_attr' => [
'v-model' => 'toggle_discount_code',

View File

@ -64,7 +64,7 @@ class Signup_Field_Email extends Base_Signup_Field {
*/
public function get_title() {
return __('Email', 'wp-ultimo');
return __('Email', 'wp-multisite-waas');
}
/**
@ -77,7 +77,7 @@ class Signup_Field_Email extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a email address field. This email address will be used to create the WordPress user.', 'wp-ultimo');
return __('Adds a email address field. This email address will be used to create the WordPress user.', 'wp-multisite-waas');
}
/**
@ -90,7 +90,7 @@ class Signup_Field_Email extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a email address field. This email address will be used to create the WordPress user.', 'wp-ultimo');
return __('Adds a email address field. This email address will be used to create the WordPress user.', 'wp-multisite-waas');
}
/**
* Returns the icon to be used on the selector.
@ -160,8 +160,8 @@ class Signup_Field_Email extends Base_Signup_Field {
return [
'display_notices' => [
'type' => 'toggle',
'title' => __('Display Notices', 'wp-ultimo'),
'desc' => __('When the customer is already logged in, a box with the customer\'s username and a link to logout is displayed instead of the email field. Disable this option if you do not want that box to show up.', 'wp-ultimo'),
'title' => __('Display Notices', 'wp-multisite-waas'),
'desc' => __('When the customer is already logged in, a box with the customer\'s username and a link to logout is displayed instead of the email field. Disable this option if you do not want that box to show up.', 'wp-multisite-waas'),
'tooltip' => '',
'value' => 1,
'html_attr' => [
@ -187,7 +187,7 @@ class Signup_Field_Email extends Base_Signup_Field {
if ($attributes['display_notices']) {
$checkout_fields['login_note'] = [
'type' => 'note',
'title' => __('Not you?', 'wp-ultimo'),
'title' => __('Not you?', 'wp-multisite-waas'),
'desc' => [$this, 'render_not_you_customer_message'],
'wrapper_classes' => wu_get_isset($attributes, 'wrapper_element_classes', ''),
'wrapper_html_attr' => [
@ -199,7 +199,7 @@ class Signup_Field_Email extends Base_Signup_Field {
if ($attributes['display_notices']) {
$checkout_fields['login_note'] = [
'type' => 'note',
'title' => __('Existing customer?', 'wp-ultimo'),
'title' => __('Existing customer?', 'wp-multisite-waas'),
'desc' => [$this, 'render_existing_customer_message'],
'wrapper_classes' => wu_get_isset($attributes, 'wrapper_element_classes', ''),
'wrapper_html_attr' => [
@ -244,7 +244,7 @@ class Signup_Field_Email extends Base_Signup_Field {
<?php // phpcs:disable
// translators: %s is the login URL.
printf(__('<a href="%s">Log in</a> to renew or change an existing membership.', 'wp-ultimo'), $login_url);
printf(__('<a href="%s">Log in</a> to renew or change an existing membership.', 'wp-multisite-waas'), $login_url);
?>
@ -273,7 +273,7 @@ class Signup_Field_Email extends Base_Signup_Field {
<?php
// translators: 1$s is the display name of the user currently logged in.
printf(__('Not %1$s? <a href="%2$s">Log in</a> using your account.', 'wp-ultimo'), wp_get_current_user()->display_name, $login_url);
printf(__('Not %1$s? <a href="%2$s">Log in</a> using your account.', 'wp-multisite-waas'), wp_get_current_user()->display_name, $login_url);
?>
</p>

View File

@ -55,7 +55,7 @@ class Signup_Field_Hidden extends Base_Signup_Field {
*/
public function get_title() {
return __('Hidden Field', 'wp-ultimo');
return __('Hidden Field', 'wp-multisite-waas');
}
/**
@ -68,7 +68,7 @@ class Signup_Field_Hidden extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a hidden field. This is useful when coupled with the "Fill from the Request" option, to load values from the URL, for example.', 'wp-ultimo');
return __('Adds a hidden field. This is useful when coupled with the "Fill from the Request" option, to load values from the URL, for example.', 'wp-multisite-waas');
}
/**
@ -81,7 +81,7 @@ class Signup_Field_Hidden extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a hidden field. This is useful when coupled with the "Fill from the Request" option, to load values from the URL, for example.', 'wp-ultimo');
return __('Adds a hidden field. This is useful when coupled with the "Fill from the Request" option, to load values from the URL, for example.', 'wp-multisite-waas');
}
/**
@ -150,9 +150,9 @@ class Signup_Field_Hidden extends Base_Signup_Field {
'fixed_value' => [
'order' => 12,
'type' => 'text',
'title' => __('Pre-filled Value', 'wp-ultimo'),
'desc' => __('The field will be populated with this value. Can be overridden if the pre-fill from request option is enabled.', 'wp-ultimo'),
'placeholder' => __('e.g. blue', 'wp-ultimo'),
'title' => __('Pre-filled Value', 'wp-multisite-waas'),
'desc' => __('The field will be populated with this value. Can be overridden if the pre-fill from request option is enabled.', 'wp-multisite-waas'),
'placeholder' => __('e.g. blue', 'wp-multisite-waas'),
'tooltip' => '',
'value' => '',
],

View File

@ -56,7 +56,7 @@ class Signup_Field_Order_Bump extends Base_Signup_Field {
*/
public function get_title() {
return __('Order Bump', 'wp-ultimo');
return __('Order Bump', 'wp-multisite-waas');
}
/**
@ -69,7 +69,7 @@ class Signup_Field_Order_Bump extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a product offer that the customer can click to add to the current cart.', 'wp-ultimo');
return __('Adds a product offer that the customer can click to add to the current cart.', 'wp-multisite-waas');
}
/**
@ -82,7 +82,7 @@ class Signup_Field_Order_Bump extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a product offer that the customer can click to add to the current cart.', 'wp-ultimo');
return __('Adds a product offer that the customer can click to add to the current cart.', 'wp-multisite-waas');
}
/**
@ -166,9 +166,9 @@ class Signup_Field_Order_Bump extends Base_Signup_Field {
$editor_fields = [
'product' => [
'type' => 'model',
'title' => __('Product', 'wp-ultimo'),
'placeholder' => __('e.g. Premium', 'wp-ultimo'),
'desc' => __('Select the product that will be presented to the customer as an add-on option.', 'wp-ultimo'),
'title' => __('Product', 'wp-multisite-waas'),
'placeholder' => __('e.g. Premium', 'wp-multisite-waas'),
'desc' => __('Select the product that will be presented to the customer as an add-on option.', 'wp-multisite-waas'),
'tooltip' => '',
'order' => 12,
'html_attr' => [
@ -182,15 +182,15 @@ class Signup_Field_Order_Bump extends Base_Signup_Field {
'display_product_description' => [
'order' => 13,
'type' => 'toggle',
'title' => __('Display Product Description', 'wp-ultimo'),
'desc' => __('Toggle to display the product description as well, if one is available.', 'wp-ultimo'),
'title' => __('Display Product Description', 'wp-multisite-waas'),
'desc' => __('Toggle to display the product description as well, if one is available.', 'wp-multisite-waas'),
'value' => 0,
],
'display_product_image' => [
'order' => 14,
'type' => 'toggle',
'title' => __('Display Product Image', 'wp-ultimo'),
'desc' => __('Toggle to display the product image as well, if one is available.', 'wp-ultimo'),
'title' => __('Display Product Image', 'wp-multisite-waas'),
'desc' => __('Toggle to display the product image as well, if one is available.', 'wp-multisite-waas'),
'value' => 1,
],
];
@ -202,8 +202,8 @@ class Signup_Field_Order_Bump extends Base_Signup_Field {
// 'fields' => array(
// 'order_bump_template' => array(
// 'type' => 'select',
// 'title' => __('Layout', 'wp-ultimo'),
// 'placeholder' => __('Select your Layout', 'wp-ultimo'),
// 'title' => __('Layout', 'wp-multisite-waas'),
// 'placeholder' => __('Select your Layout', 'wp-multisite-waas'),
// 'options' => array($this, 'get_templates'),
// 'wrapper_classes' => 'wu-flex-grow',
// 'html_attr' => array(
@ -219,7 +219,7 @@ class Signup_Field_Order_Bump extends Base_Signup_Field {
// 'order' => 99,
// 'wrapper_classes' => 'sm:wu-p-0 sm:wu-block',
// 'classes' => '',
// 'desc' => sprintf('<div class="wu-p-4 wu-bg-blue-100 wu-text-grey-600">%s</div>', __('Want to add customized order bump templates?<br><a target="_blank" class="wu-no-underline" href="https://help.wpultimo.com/article/343-customize-your-checkout-flow-using-field-templates">See how you can do that here</a>.', 'wp-ultimo')),
// 'desc' => sprintf('<div class="wu-p-4 wu-bg-blue-100 wu-text-grey-600">%s</div>', __('Want to add customized order bump templates?<br><a target="_blank" class="wu-no-underline" href="https://help.wpultimo.com/article/343-customize-your-checkout-flow-using-field-templates">See how you can do that here</a>.', 'wp-multisite-waas')),
// );
return $editor_fields;
@ -247,7 +247,7 @@ class Signup_Field_Order_Bump extends Base_Signup_Field {
$template_class = Field_Templates_Manager::get_instance()->get_template_class('order_bump', $attributes['order_bump_template']);
$content = $template_class ? $template_class->render_container($attributes) : __('Template does not exist.', 'wp-ultimo');
$content = $template_class ? $template_class->render_container($attributes) : __('Template does not exist.', 'wp-multisite-waas');
return [
$attributes['id'] => [

View File

@ -54,7 +54,7 @@ class Signup_Field_Order_Summary extends Base_Signup_Field {
*/
public function get_title() {
return __('Order Summary', 'wp-ultimo');
return __('Order Summary', 'wp-multisite-waas');
}
/**
@ -67,7 +67,7 @@ class Signup_Field_Order_Summary extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a summary table with prices, key subscription dates, discounts, and taxes.', 'wp-ultimo');
return __('Adds a summary table with prices, key subscription dates, discounts, and taxes.', 'wp-multisite-waas');
}
/**
@ -80,7 +80,7 @@ class Signup_Field_Order_Summary extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a summary table with prices, key subscription dates, discounts, and taxes.', 'wp-ultimo');
return __('Adds a summary table with prices, key subscription dates, discounts, and taxes.', 'wp-multisite-waas');
}
/**
@ -163,11 +163,11 @@ class Signup_Field_Order_Summary extends Base_Signup_Field {
$editor_fields['table_columns'] = [
'type' => 'select',
'title' => __('Table Columns', 'wp-ultimo'),
'desc' => __('"Simplified" will condense all discount and tax info into separate rows to keep the table with only two columns. "Display All" adds a discounts and taxes column to each product row.', 'wp-ultimo'),
'title' => __('Table Columns', 'wp-multisite-waas'),
'desc' => __('"Simplified" will condense all discount and tax info into separate rows to keep the table with only two columns. "Display All" adds a discounts and taxes column to each product row.', 'wp-multisite-waas'),
'options' => [
'simple' => __('Simplified', 'wp-ultimo'),
'full' => __('Display All', 'wp-ultimo'),
'simple' => __('Simplified', 'wp-multisite-waas'),
'full' => __('Display All', 'wp-multisite-waas'),
],
];
@ -177,8 +177,8 @@ class Signup_Field_Order_Summary extends Base_Signup_Field {
'fields' => [
'order_summary_template' => [
'type' => 'select',
'title' => __('Layout', 'wp-ultimo'),
'placeholder' => __('Select your Layout', 'wp-ultimo'),
'title' => __('Layout', 'wp-multisite-waas'),
'placeholder' => __('Select your Layout', 'wp-multisite-waas'),
'options' => [$this, 'get_templates'],
'wrapper_classes' => 'wu-flex-grow',
'html_attr' => [
@ -194,7 +194,7 @@ class Signup_Field_Order_Summary extends Base_Signup_Field {
// 'order' => 99,
// 'wrapper_classes' => 'sm:wu-p-0 sm:wu-block',
// 'classes' => '',
// 'desc' => sprintf('<div class="wu-p-4 wu-bg-blue-100 wu-text-grey-600">%s</div>', __('Want to add customized order summary templates?<br><a target="_blank" class="wu-no-underline" href="https://help.wpultimo.com/article/343-customize-your-checkout-flow-using-field-templates">See how you can do that here</a>.', 'wp-ultimo')),
// 'desc' => sprintf('<div class="wu-p-4 wu-bg-blue-100 wu-text-grey-600">%s</div>', __('Want to add customized order summary templates?<br><a target="_blank" class="wu-no-underline" href="https://help.wpultimo.com/article/343-customize-your-checkout-flow-using-field-templates">See how you can do that here</a>.', 'wp-multisite-waas')),
// );
return $editor_fields;
@ -221,7 +221,7 @@ class Signup_Field_Order_Summary extends Base_Signup_Field {
$template_class = Field_Templates_Manager::get_instance()->get_template_class('order_summary', $attributes['order_summary_template']);
$content = $template_class ? $template_class->render_container($attributes) : __('Template does not exist.', 'wp-ultimo');
$content = $template_class ? $template_class->render_container($attributes) : __('Template does not exist.', 'wp-multisite-waas');
$checkout_fields[ $attributes['id'] ] = [
'type' => 'note',

View File

@ -69,7 +69,7 @@ class Signup_Field_Password extends Base_Signup_Field {
*/
public function get_title() {
return __('Password', 'wp-ultimo');
return __('Password', 'wp-multisite-waas');
}
/**
@ -82,7 +82,7 @@ class Signup_Field_Password extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a password field, with options for enforcing password strength and adding password confirmation field. This password is then used to create the WordPress user.', 'wp-ultimo');
return __('Adds a password field, with options for enforcing password strength and adding password confirmation field. This password is then used to create the WordPress user.', 'wp-multisite-waas');
}
/**
@ -95,7 +95,7 @@ class Signup_Field_Password extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a password field, with options for enforcing password strength and adding password confirmation field. This password is then used to create the WordPress user.', 'wp-ultimo');
return __('Adds a password field, with options for enforcing password strength and adding password confirmation field. This password is then used to create the WordPress user.', 'wp-multisite-waas');
}
/**
@ -124,7 +124,7 @@ class Signup_Field_Password extends Base_Signup_Field {
return [
'password_confirm_field' => false,
'password_confirm_label' => __('Confirm Password', 'wp-ultimo'),
'password_confirm_label' => __('Confirm Password', 'wp-multisite-waas'),
];
}
@ -168,14 +168,14 @@ class Signup_Field_Password extends Base_Signup_Field {
return [
'password_strength_meter' => [
'type' => 'toggle',
'title' => __('Display Password Strength Meter', 'wp-ultimo'),
'desc' => __('Adds a password strength meter below the password field. Enabling this option also enforces passwords to be strong.', 'wp-ultimo'),
'title' => __('Display Password Strength Meter', 'wp-multisite-waas'),
'desc' => __('Adds a password strength meter below the password field. Enabling this option also enforces passwords to be strong.', 'wp-multisite-waas'),
'value' => 1,
],
'password_confirm_field' => [
'type' => 'toggle',
'title' => __('Display Password Confirm Field', 'wp-ultimo'),
'desc' => __('Adds a "Confirm your Password" field below the default password field to reduce the chance or making a mistake.', 'wp-ultimo'),
'title' => __('Display Password Confirm Field', 'wp-multisite-waas'),
'desc' => __('Adds a "Confirm your Password" field below the default password field to reduce the chance or making a mistake.', 'wp-multisite-waas'),
'value' => 1,
],
];

View File

@ -56,7 +56,7 @@ class Signup_Field_Payment extends Base_Signup_Field {
*/
public function get_title() {
return __('Payment', 'wp-ultimo');
return __('Payment', 'wp-multisite-waas');
}
/**
@ -69,7 +69,7 @@ class Signup_Field_Payment extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds the payment options and the additional fields required to complete a purchase (e.g. credit card field).', 'wp-ultimo');
return __('Adds the payment options and the additional fields required to complete a purchase (e.g. credit card field).', 'wp-multisite-waas');
}
/**
@ -82,7 +82,7 @@ class Signup_Field_Payment extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds the payment options and the additional fields required to complete a purchase (e.g. credit card field).', 'wp-ultimo');
return __('Adds the payment options and the additional fields required to complete a purchase (e.g. credit card field).', 'wp-multisite-waas');
}
/**
@ -190,7 +190,7 @@ class Signup_Field_Payment extends Base_Signup_Field {
$fields['auto_renew'] = [
'type' => 'toggle',
'id' => 'auto_renew',
'name' => __('Auto-renew', 'wp-ultimo'),
'name' => __('Auto-renew', 'wp-multisite-waas'),
'tooltip' => '',
'value' => '1',
'html_attr' => [
@ -200,7 +200,7 @@ class Signup_Field_Payment extends Base_Signup_Field {
],
'wrapper_html_attr' => [
'v-cloak' => 1,
'v-show' => sprintf('%s.includes(gateway) && order.should_collect_payment && order.has_recurring', json_encode($auto_renewable_gateways)),
'v-show' => sprintf('%s.includes(gateway) && order.should_collect_payment && order.has_recurring', wp_json_encode($auto_renewable_gateways)),
],
];
}

View File

@ -54,7 +54,7 @@ class Signup_Field_Period_Selection extends Base_Signup_Field {
*/
public function get_title() {
return __('Period Select', 'wp-ultimo');
return __('Period Select', 'wp-multisite-waas');
}
/**
@ -67,7 +67,7 @@ class Signup_Field_Period_Selection extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a period selector, that allows customers to switch between different billing periods.', 'wp-ultimo');
return __('Adds a period selector, that allows customers to switch between different billing periods.', 'wp-multisite-waas');
}
/**
@ -80,7 +80,7 @@ class Signup_Field_Period_Selection extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a period selector, that allows customers to switch between different billing periods.', 'wp-ultimo');
return __('Adds a period selector, that allows customers to switch between different billing periods.', 'wp-multisite-waas');
}
/**
@ -134,7 +134,7 @@ class Signup_Field_Period_Selection extends Base_Signup_Field {
return [
'id' => 'period_selection',
'name' => __('Plan Duration Switch', 'wp-ultimo'),
'name' => __('Plan Duration Switch', 'wp-multisite-waas'),
'required' => true,
];
}
@ -169,8 +169,8 @@ class Signup_Field_Period_Selection extends Base_Signup_Field {
'fields' => [
'period_selection_template' => [
'type' => 'select',
'title' => __('Period Selector Template', 'wp-ultimo'),
'placeholder' => __('Select your Template', 'wp-ultimo'),
'title' => __('Period Selector Template', 'wp-multisite-waas'),
'placeholder' => __('Select your Template', 'wp-multisite-waas'),
'options' => [$this, 'get_template_options'],
'wrapper_classes' => 'wu-flex-grow',
'html_attr' => [
@ -182,14 +182,14 @@ class Signup_Field_Period_Selection extends Base_Signup_Field {
$editor_fields['period_options_header'] = [
'type' => 'small-header',
'title' => __('Options', 'wp-ultimo'),
'desc' => __('Add different options below. These need to match your product price variations.', 'wp-ultimo'),
'title' => __('Options', 'wp-multisite-waas'),
'desc' => __('Add different options below. These need to match your product price variations.', 'wp-multisite-waas'),
'order' => 90,
];
$editor_fields['period_options_empty'] = [
'type' => 'note',
'desc' => __('Add the first option using the button below.', 'wp-ultimo'),
'desc' => __('Add the first option using the button below.', 'wp-multisite-waas'),
'classes' => 'wu-text-gray-600 wu-text-xs wu-text-center wu-w-full',
'wrapper_classes' => 'wu-bg-gray-100 wu-items-end',
'order' => 90.5,
@ -212,12 +212,12 @@ class Signup_Field_Period_Selection extends Base_Signup_Field {
'fields' => [
'period_options_remove' => [
'type' => 'note',
'desc' => sprintf('<a title="%s" class="wu-no-underline wu-inline-block wu-text-gray-600 wu-mt-2 wu-mr-2" href="#" @click.prevent="() => period_options.splice(index, 1)"><span class="dashicons-wu-squared-cross"></span></a>', __('Remove', 'wp-ultimo')),
'desc' => sprintf('<a title="%s" class="wu-no-underline wu-inline-block wu-text-gray-600 wu-mt-2 wu-mr-2" href="#" @click.prevent="() => period_options.splice(index, 1)"><span class="dashicons-wu-squared-cross"></span></a>', __('Remove', 'wp-multisite-waas')),
'wrapper_classes' => 'wu-absolute wu-top-0 wu-right-0',
],
'period_options_duration' => [
'type' => 'number',
'title' => __('Duration', 'wp-ultimo'),
'title' => __('Duration', 'wp-multisite-waas'),
'placeholder' => '',
'wrapper_classes' => 'wu-w-2/12',
'min' => 1,
@ -237,16 +237,16 @@ class Signup_Field_Period_Selection extends Base_Signup_Field {
'v-bind:name' => '"period_options[" + index + "][duration_unit]"',
],
'options' => [
'day' => __('Days', 'wp-ultimo'),
'week' => __('Weeks', 'wp-ultimo'),
'month' => __('Months', 'wp-ultimo'),
'year' => __('Years', 'wp-ultimo'),
'day' => __('Days', 'wp-multisite-waas'),
'week' => __('Weeks', 'wp-multisite-waas'),
'month' => __('Months', 'wp-multisite-waas'),
'year' => __('Years', 'wp-multisite-waas'),
],
],
'period_options_label' => [
'type' => 'text',
'title' => __('Label', 'wp-ultimo'),
'placeholder' => __('e.g. Monthly', 'wp-ultimo'),
'title' => __('Label', 'wp-multisite-waas'),
'placeholder' => __('e.g. Monthly', 'wp-multisite-waas'),
'wrapper_classes' => 'wu-w-5/12',
'html_attr' => [
'v-model' => 'period_option.label',
@ -259,7 +259,7 @@ class Signup_Field_Period_Selection extends Base_Signup_Field {
$editor_fields['repeat'] = [
'order' => 92,
'type' => 'submit',
'title' => __('+ Add option', 'wp-ultimo'),
'title' => __('+ Add option', 'wp-multisite-waas'),
'classes' => 'wu-uppercase wu-text-2xs wu-text-blue-700 wu-border-none wu-bg-transparent wu-font-bold wu-text-right wu-w-full wu-cursor-pointer',
'wrapper_classes' => 'wu-bg-gray-100 wu-items-end',
'wrapper_html_attr' => [
@ -297,7 +297,7 @@ class Signup_Field_Period_Selection extends Base_Signup_Field {
$template_class = Field_Templates_Manager::get_instance()->get_template_class('period_selection', $attributes['period_selection_template']);
$content = $template_class ? $template_class->render_container($attributes) : __('Template does not exist.', 'wp-ultimo');
$content = $template_class ? $template_class->render_container($attributes) : __('Template does not exist.', 'wp-multisite-waas');
$checkout_fields = [];

View File

@ -54,7 +54,7 @@ class Signup_Field_Pricing_Table extends Base_Signup_Field {
*/
public function get_title() {
return __('Pricing Table', 'wp-ultimo');
return __('Pricing Table', 'wp-multisite-waas');
}
/**
@ -67,7 +67,7 @@ class Signup_Field_Pricing_Table extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a pricing table section that customers can use to choose a plan to subscribe to.', 'wp-ultimo');
return __('Adds a pricing table section that customers can use to choose a plan to subscribe to.', 'wp-multisite-waas');
}
/**
@ -80,7 +80,7 @@ class Signup_Field_Pricing_Table extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a pricing table section that customers can use to choose a plan to subscribe to.', 'wp-ultimo');
return __('Adds a pricing table section that customers can use to choose a plan to subscribe to.', 'wp-multisite-waas');
}
/**
@ -137,7 +137,7 @@ class Signup_Field_Pricing_Table extends Base_Signup_Field {
return [
'id' => 'pricing_table',
'name' => __('Plan Selection', 'wp-ultimo'),
'name' => __('Plan Selection', 'wp-multisite-waas'),
'required' => true,
];
}
@ -167,9 +167,9 @@ class Signup_Field_Pricing_Table extends Base_Signup_Field {
$editor_fields['pricing_table_products'] = [
'type' => 'model',
'title' => __('Products', 'wp-ultimo'),
'placeholder' => __('e.g. Premium', 'wp-ultimo'),
'desc' => __('Be sure to add the products in the order you want them to show up.', 'wp-ultimo'),
'title' => __('Products', 'wp-multisite-waas'),
'placeholder' => __('e.g. Premium', 'wp-multisite-waas'),
'desc' => __('Be sure to add the products in the order you want them to show up.', 'wp-multisite-waas'),
'tooltip' => '',
'order' => 20,
'html_attr' => [
@ -184,8 +184,8 @@ class Signup_Field_Pricing_Table extends Base_Signup_Field {
$editor_fields['force_different_durations'] = [
'type' => 'toggle',
'title' => __('Force Different Durations', 'wp-ultimo'),
'desc' => __('Check this option to force the display of plans with different recurring durations.', 'wp-ultimo'),
'title' => __('Force Different Durations', 'wp-multisite-waas'),
'desc' => __('Check this option to force the display of plans with different recurring durations.', 'wp-multisite-waas'),
'tooltip' => '',
'value' => 0,
'order' => 22,
@ -196,9 +196,9 @@ class Signup_Field_Pricing_Table extends Base_Signup_Field {
$editor_fields['hide_pricing_table_when_pre_selected'] = [
'type' => 'toggle',
'title' => __('Hide when Pre-Selected', 'wp-ultimo'),
'desc' => __('Prevent customers from seeing this field when a plan was already selected via the URL.', 'wp-ultimo'),
'tooltip' => __('If the pricing table field is the only field in the current step, the step will be skipped.', 'wp-ultimo'),
'title' => __('Hide when Pre-Selected', 'wp-multisite-waas'),
'desc' => __('Prevent customers from seeing this field when a plan was already selected via the URL.', 'wp-multisite-waas'),
'tooltip' => __('If the pricing table field is the only field in the current step, the step will be skipped.', 'wp-multisite-waas'),
'value' => 0,
'order' => 24,
'html_attr' => [
@ -213,8 +213,8 @@ class Signup_Field_Pricing_Table extends Base_Signup_Field {
'fields' => [
'pricing_table_template' => [
'type' => 'select',
'title' => __('Pricing Table Template', 'wp-ultimo'),
'placeholder' => __('Select your Template', 'wp-ultimo'),
'title' => __('Pricing Table Template', 'wp-multisite-waas'),
'placeholder' => __('Select your Template', 'wp-multisite-waas'),
'options' => [$this, 'get_pricing_table_templates'],
'wrapper_classes' => 'wu-flex-grow',
'html_attr' => [
@ -230,7 +230,7 @@ class Signup_Field_Pricing_Table extends Base_Signup_Field {
// 'order' => 99,
// 'wrapper_classes' => 'sm:wu-p-0 sm:wu-block',
// 'classes' => '',
// 'desc' => sprintf('<div class="wu-p-4 wu-bg-blue-100 wu-text-grey-600">%s</div>', __('Want to add customized pricing table templates?<br><a target="_blank" class="wu-no-underline" href="https://help.wpultimo.com/article/343-customize-your-checkout-flow-using-field-templates">See how you can do that here</a>.', 'wp-ultimo')),
// 'desc' => sprintf('<div class="wu-p-4 wu-bg-blue-100 wu-text-grey-600">%s</div>', __('Want to add customized pricing table templates?<br><a target="_blank" class="wu-no-underline" href="https://help.wpultimo.com/article/343-customize-your-checkout-flow-using-field-templates">See how you can do that here</a>.', 'wp-multisite-waas')),
// );
return $editor_fields;
@ -277,7 +277,7 @@ class Signup_Field_Pricing_Table extends Base_Signup_Field {
$template_class = Field_Templates_Manager::get_instance()->get_template_class('pricing_table', $attributes['pricing_table_template']);
$content = $template_class ? $template_class->render_container($template_attributes) : __('Template does not exist.', 'wp-ultimo');
$content = $template_class ? $template_class->render_container($template_attributes) : __('Template does not exist.', 'wp-multisite-waas');
$checkout_fields = [];

View File

@ -53,7 +53,7 @@ class Signup_Field_Products extends Base_Signup_Field {
*/
public function get_title() {
return __('Product', 'wp-ultimo');
return __('Product', 'wp-multisite-waas');
}
/**
@ -66,7 +66,7 @@ class Signup_Field_Products extends Base_Signup_Field {
*/
public function get_description() {
return __('Hidden field used to pre-select products. This is useful when you have a signup page for specific offering/bundles and do not want your customers to be able to choose plans and products manually.', 'wp-ultimo');
return __('Hidden field used to pre-select products. This is useful when you have a signup page for specific offering/bundles and do not want your customers to be able to choose plans and products manually.', 'wp-multisite-waas');
}
/**
@ -79,7 +79,7 @@ class Signup_Field_Products extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Hidden field used to pre-select products. This is useful when you have a signup page for specific offering/bundles and do not want your customers to be able to choose plans and products manually.', 'wp-ultimo');
return __('Hidden field used to pre-select products. This is useful when you have a signup page for specific offering/bundles and do not want your customers to be able to choose plans and products manually.', 'wp-multisite-waas');
}
/**
@ -130,7 +130,7 @@ class Signup_Field_Products extends Base_Signup_Field {
public function force_attributes() {
return [
'name' => __('Pre-selected Products', 'wp-ultimo'),
'name' => __('Pre-selected Products', 'wp-multisite-waas'),
'id' => 'products',
];
}
@ -146,9 +146,9 @@ class Signup_Field_Products extends Base_Signup_Field {
return [
'products' => [
'type' => 'model',
'title' => __('Products', 'wp-ultimo'),
'placeholder' => __('Products', 'wp-ultimo'),
'desc' => __('Use this field to pre-select products. This is useful when you have a signup page for specific offering/bundles and do not want your customers to be able to choose plans and other products manually.', 'wp-ultimo'),
'title' => __('Products', 'wp-multisite-waas'),
'placeholder' => __('Products', 'wp-multisite-waas'),
'desc' => __('Use this field to pre-select products. This is useful when you have a signup page for specific offering/bundles and do not want your customers to be able to choose plans and other products manually.', 'wp-multisite-waas'),
'tooltip' => '',
'html_attr' => [
'data-model' => 'product',
@ -216,7 +216,7 @@ class Signup_Field_Products extends Base_Signup_Field {
});";
if (did_action('wu-checkout')) {
wp_add_inline_script('wu-checkout', sprintf($script, json_encode($products)), 'before');
wp_add_inline_script('wu-checkout', sprintf($script, wp_json_encode($products)), 'before');
return;
}
@ -225,7 +225,7 @@ class Signup_Field_Products extends Base_Signup_Field {
'wp_enqueue_scripts',
function () use ($script, $products) {
wp_add_inline_script('wu-checkout', sprintf($script, json_encode($products)), 'before');
wp_add_inline_script('wu-checkout', sprintf($script, wp_json_encode($products)), 'before');
},
11
);

View File

@ -55,7 +55,7 @@ class Signup_Field_Select extends Base_Signup_Field {
*/
public function get_title() {
return __('Select', 'wp-ultimo');
return __('Select', 'wp-multisite-waas');
}
/**
@ -68,7 +68,7 @@ class Signup_Field_Select extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a select field.', 'wp-ultimo');
return __('Adds a select field.', 'wp-multisite-waas');
}
/**
@ -81,7 +81,7 @@ class Signup_Field_Select extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a select field.', 'wp-ultimo');
return __('Adds a select field.', 'wp-multisite-waas');
}
/**
@ -156,13 +156,13 @@ class Signup_Field_Select extends Base_Signup_Field {
$editor_fields['options_header'] = [
'order' => 12,
'type' => 'small-header',
'title' => __('Options', 'wp-ultimo'),
'desc' => __('Add different options below. The first option is used as the default.', 'wp-ultimo'),
'title' => __('Options', 'wp-multisite-waas'),
'desc' => __('Add different options below. The first option is used as the default.', 'wp-multisite-waas'),
];
$editor_fields['options_empty'] = [
'type' => 'note',
'desc' => __('Add the first option using the button below.', 'wp-ultimo'),
'desc' => __('Add the first option using the button below.', 'wp-multisite-waas'),
'classes' => 'wu-text-gray-600 wu-text-xs wu-text-center wu-w-full',
'wrapper_classes' => 'wu-bg-gray-100 wu-items-end',
'order' => 13,
@ -185,13 +185,13 @@ class Signup_Field_Select extends Base_Signup_Field {
'fields' => [
'options_remove' => [
'type' => 'note',
'desc' => sprintf('<a title="%s" class="wu-no-underline wu-inline-block wu-text-gray-600 wu-mt-2 wu-mr-2" href="#" @click.prevent="() => options.splice(index, 1)"><span class="dashicons-wu-squared-cross"></span></a>', __('Remove', 'wp-ultimo')),
'desc' => sprintf('<a title="%s" class="wu-no-underline wu-inline-block wu-text-gray-600 wu-mt-2 wu-mr-2" href="#" @click.prevent="() => options.splice(index, 1)"><span class="dashicons-wu-squared-cross"></span></a>', __('Remove', 'wp-multisite-waas')),
'wrapper_classes' => 'wu-absolute wu-top-0 wu-right-0',
],
'options_key' => [
'type' => 'text',
'title' => __('Option Value', 'wp-ultimo'),
'placeholder' => __('e.g. option1', 'wp-ultimo'),
'title' => __('Option Value', 'wp-multisite-waas'),
'placeholder' => __('e.g. option1', 'wp-multisite-waas'),
'wrapper_classes' => 'wu-w-1/2 wu-mr-2',
'html_attr' => [
'v-model' => 'option.key',
@ -201,8 +201,8 @@ class Signup_Field_Select extends Base_Signup_Field {
],
'options_label' => [
'type' => 'text',
'title' => __('Label', 'wp-ultimo'),
'placeholder' => __('e.g. Option 1', 'wp-ultimo'),
'title' => __('Label', 'wp-multisite-waas'),
'placeholder' => __('e.g. Option 1', 'wp-multisite-waas'),
'wrapper_classes' => 'wu-w-1/2 wu-ml-2',
'html_attr' => [
'v-model' => 'option.label',
@ -215,7 +215,7 @@ class Signup_Field_Select extends Base_Signup_Field {
$editor_fields['repeat_select_option'] = [
'order' => 16,
'type' => 'submit',
'title' => __('+ Add option', 'wp-ultimo'),
'title' => __('+ Add option', 'wp-multisite-waas'),
'classes' => 'wu-uppercase wu-text-2xs wu-text-blue-700 wu-border-none wu-bg-transparent wu-font-bold wu-text-right wu-w-full wu-cursor-pointer',
'wrapper_classes' => 'wu-bg-gray-100 wu-items-end',
'wrapper_html_attr' => [

View File

@ -53,7 +53,7 @@ class Signup_Field_Shortcode extends Base_Signup_Field {
*/
public function get_title() {
return __('Shortcode', 'wp-ultimo');
return __('Shortcode', 'wp-multisite-waas');
}
/**
@ -66,7 +66,7 @@ class Signup_Field_Shortcode extends Base_Signup_Field {
*/
public function get_description() {
return __('Displays the content of a given WordPress shortcode. Can be useful to inset content from other plugins inside a WP Multisite WaaS checkout form.', 'wp-ultimo');
return __('Displays the content of a given WordPress shortcode. Can be useful to inset content from other plugins inside a WP Multisite WaaS checkout form.', 'wp-multisite-waas');
}
/**
@ -79,7 +79,7 @@ class Signup_Field_Shortcode extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Displays the content of a given WordPress shortcode. Can be useful to insert content from other plugins inside a WP Multisite WaaS checkout form.', 'wp-ultimo');
return __('Displays the content of a given WordPress shortcode. Can be useful to insert content from other plugins inside a WP Multisite WaaS checkout form.', 'wp-multisite-waas');
}
/**
@ -133,7 +133,7 @@ class Signup_Field_Shortcode extends Base_Signup_Field {
public function force_attributes() {
return [
'name' => __('Shortcode', 'wp-ultimo'),
'name' => __('Shortcode', 'wp-multisite-waas'),
];
}
@ -148,9 +148,9 @@ class Signup_Field_Shortcode extends Base_Signup_Field {
return [
'shortcode_code' => [
'type' => 'text',
'title' => __('Shortcode', 'wp-ultimo'),
'placeholder' => __('e.g. [shortcode]', 'wp-ultimo'),
'desc' => __('Please, enter the full shortcode, including [].', 'wp-ultimo'),
'title' => __('Shortcode', 'wp-multisite-waas'),
'placeholder' => __('e.g. [shortcode]', 'wp-multisite-waas'),
'desc' => __('Please, enter the full shortcode, including [].', 'wp-multisite-waas'),
],
];
}

View File

@ -66,7 +66,7 @@ class Signup_Field_Site_Title extends Base_Signup_Field {
*/
public function get_title() {
return __('Site Title', 'wp-ultimo');
return __('Site Title', 'wp-multisite-waas');
}
/**
@ -79,7 +79,7 @@ class Signup_Field_Site_Title extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a Site Title field. This value is used to set the site title for the site being created.', 'wp-ultimo');
return __('Adds a Site Title field. This value is used to set the site title for the site being created.', 'wp-multisite-waas');
}
/**
@ -92,7 +92,7 @@ class Signup_Field_Site_Title extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a Site Title field. This value is used to set the site title for the site being created.', 'wp-ultimo');
return __('Adds a Site Title field. This value is used to set the site title for the site being created.', 'wp-multisite-waas');
}
/**
@ -164,8 +164,8 @@ class Signup_Field_Site_Title extends Base_Signup_Field {
return [
'auto_generate_site_title' => [
'type' => 'toggle',
'title' => __('Auto-generate?', 'wp-ultimo'),
'desc' => __('Check this option to auto-generate this field based on the username of the customer.', 'wp-ultimo'),
'title' => __('Auto-generate?', 'wp-multisite-waas'),
'desc' => __('Check this option to auto-generate this field based on the username of the customer.', 'wp-multisite-waas'),
'tooltip' => '',
'value' => 0,
'html_attr' => [

View File

@ -63,7 +63,7 @@ class Signup_Field_Site_Url extends Base_Signup_Field {
*/
public function get_title() {
return __('Site URL', 'wp-ultimo');
return __('Site URL', 'wp-multisite-waas');
}
/**
@ -76,7 +76,7 @@ class Signup_Field_Site_Url extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a Site URL field. This is used to set the URL of the site being created.', 'wp-ultimo');
return __('Adds a Site URL field. This is used to set the URL of the site being created.', 'wp-multisite-waas');
}
/**
@ -89,7 +89,7 @@ class Signup_Field_Site_Url extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a Site URL field. This is used to set the URL of the site being created.', 'wp-ultimo');
return __('Adds a Site URL field. This is used to set the URL of the site being created.', 'wp-multisite-waas');
}
/**
@ -169,8 +169,8 @@ class Signup_Field_Site_Url extends Base_Signup_Field {
'auto_generate_site_url' => [
'order' => 12,
'type' => 'toggle',
'title' => __('Auto-generate', 'wp-ultimo'),
'desc' => __('Check this option to auto-generate this field based on the username of the customer.', 'wp-ultimo'),
'title' => __('Auto-generate', 'wp-multisite-waas'),
'desc' => __('Check this option to auto-generate this field based on the username of the customer.', 'wp-multisite-waas'),
'tooltip' => '',
'value' => 0,
'html_attr' => [
@ -180,8 +180,8 @@ class Signup_Field_Site_Url extends Base_Signup_Field {
'display_field_attachments' => [
'order' => 18,
'type' => 'toggle',
'title' => __('Display URL field attachments', 'wp-ultimo'),
'desc' => __('Adds the prefix and suffix blocks to the URL field.', 'wp-ultimo'),
'title' => __('Display URL field attachments', 'wp-multisite-waas'),
'desc' => __('Adds the prefix and suffix blocks to the URL field.', 'wp-multisite-waas'),
'tooltip' => '',
'value' => 1,
'tab' => 'content',
@ -195,8 +195,8 @@ class Signup_Field_Site_Url extends Base_Signup_Field {
'display_url_preview' => [
'order' => 19,
'type' => 'toggle',
'title' => __('Display URL preview block', 'wp-ultimo'),
'desc' => __('Adds a preview block that shows the final URL.', 'wp-ultimo'),
'title' => __('Display URL preview block', 'wp-multisite-waas'),
'desc' => __('Adds a preview block that shows the final URL.', 'wp-multisite-waas'),
'tooltip' => '',
'value' => 1,
'tab' => 'content',
@ -210,8 +210,8 @@ class Signup_Field_Site_Url extends Base_Signup_Field {
'enable_domain_selection' => [
'order' => 20,
'type' => 'toggle',
'title' => __('Enable Domain Selection', 'wp-ultimo'),
'desc' => __('Offer different domain options to your customers to choose from.', 'wp-ultimo'),
'title' => __('Enable Domain Selection', 'wp-multisite-waas'),
'desc' => __('Offer different domain options to your customers to choose from.', 'wp-multisite-waas'),
'tooltip' => '',
'value' => 0,
'tab' => 'content',
@ -226,9 +226,9 @@ class Signup_Field_Site_Url extends Base_Signup_Field {
'available_domains' => [
'order' => 30,
'type' => 'textarea',
'title' => __('Available Domains', 'wp-ultimo'),
'title' => __('Available Domains', 'wp-multisite-waas'),
'desc' => '',
'desc' => __('Enter one domain option per line.', 'wp-ultimo'),
'desc' => __('Enter one domain option per line.', 'wp-multisite-waas'),
'value' => $current_site->domain . PHP_EOL,
'tab' => 'content',
'wrapper_html_attr' => [
@ -250,8 +250,8 @@ class Signup_Field_Site_Url extends Base_Signup_Field {
public function get_url_preview_templates() {
$templates = [
'legacy/signup/steps/step-domain-url-preview' => __('New URL Preview', 'wp-ultimo'),
// 'legacy/signup/steps/step-domain-url-preview' => __('Legacy Template', 'wp-ultimo'),
'legacy/signup/steps/step-domain-url-preview' => __('New URL Preview', 'wp-multisite-waas'),
// 'legacy/signup/steps/step-domain-url-preview' => __('Legacy Template', 'wp-multisite-waas'),
];
return apply_filters('wu_get_pricing_table_templates', $templates);
@ -331,7 +331,7 @@ class Signup_Field_Site_Url extends Base_Signup_Field {
$options = $this->get_domain_options($attributes['available_domains']);
$checkout_fields['site_domain'] = [
'name' => __('Domain', 'wp-ultimo'),
'name' => __('Domain', 'wp-multisite-waas'),
'options' => $options,
'wrapper_classes' => wu_get_isset($attributes, 'wrapper_element_classes', ''),
'classes' => wu_get_isset($attributes, 'element_classes', ''),

View File

@ -54,7 +54,7 @@ class Signup_Field_Steps extends Base_Signup_Field {
*/
public function get_title() {
return __('Steps', 'wp-ultimo');
return __('Steps', 'wp-multisite-waas');
}
/**
@ -67,7 +67,7 @@ class Signup_Field_Steps extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a list of the steps.', 'wp-ultimo');
return __('Adds a list of the steps.', 'wp-multisite-waas');
}
/**
@ -80,7 +80,7 @@ class Signup_Field_Steps extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a list of the steps.', 'wp-ultimo');
return __('Adds a list of the steps.', 'wp-multisite-waas');
}
/**
@ -163,8 +163,8 @@ class Signup_Field_Steps extends Base_Signup_Field {
'fields' => [
'steps_template' => [
'type' => 'select',
'title' => __('Layout', 'wp-ultimo'),
'placeholder' => __('Select your Layout', 'wp-ultimo'),
'title' => __('Layout', 'wp-multisite-waas'),
'placeholder' => __('Select your Layout', 'wp-multisite-waas'),
'options' => [$this, 'get_templates'],
'wrapper_classes' => 'wu-flex-grow',
'html_attr' => [
@ -180,7 +180,7 @@ class Signup_Field_Steps extends Base_Signup_Field {
// 'order' => 99,
// 'wrapper_classes' => 'sm:wu-p-0 sm:wu-block',
// 'classes' => '',
// 'desc' => sprintf('<div class="wu-p-4 wu-bg-blue-100 wu-text-grey-600">%s</div>', __('Want to add customized steps templates?<br><a target="_blank" class="wu-no-underline" href="https://help.wpultimo.com/article/343-customize-your-checkout-flow-using-field-templates">See how you can do that here</a>.', 'wp-ultimo')),
// 'desc' => sprintf('<div class="wu-p-4 wu-bg-blue-100 wu-text-grey-600">%s</div>', __('Want to add customized steps templates?<br><a target="_blank" class="wu-no-underline" href="https://help.wpultimo.com/article/343-customize-your-checkout-flow-using-field-templates">See how you can do that here</a>.', 'wp-multisite-waas')),
// );
return $editor_fields;
@ -207,7 +207,7 @@ class Signup_Field_Steps extends Base_Signup_Field {
$template_class = Field_Templates_Manager::get_instance()->get_template_class('steps', $attributes['steps_template']);
$content = $template_class ? $template_class->render_container($attributes) : __('Template does not exist.', 'wp-ultimo');
$content = $template_class ? $template_class->render_container($attributes) : __('Template does not exist.', 'wp-multisite-waas');
return [
$attributes['id'] => [

View File

@ -55,7 +55,7 @@ class Signup_Field_Submit_Button extends Base_Signup_Field {
*/
public function get_title() {
return __('Submit Button', 'wp-ultimo');
return __('Submit Button', 'wp-multisite-waas');
}
/**
@ -68,7 +68,7 @@ class Signup_Field_Submit_Button extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a submit button. This is required to finalize single-step checkout forms or to navigate to the next step on multi-step checkout forms.', 'wp-ultimo');
return __('Adds a submit button. This is required to finalize single-step checkout forms or to navigate to the next step on multi-step checkout forms.', 'wp-multisite-waas');
}
/**
@ -81,7 +81,7 @@ class Signup_Field_Submit_Button extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a submit button. This is required to finalize single-step checkout forms or to navigate to the next step on multi-step checkout forms.', 'wp-ultimo');
return __('Adds a submit button. This is required to finalize single-step checkout forms or to navigate to the next step on multi-step checkout forms.', 'wp-multisite-waas');
}
/**
@ -110,7 +110,7 @@ class Signup_Field_Submit_Button extends Base_Signup_Field {
return [
'enable_go_back_button' => false,
'back_button_label' => __('&larr; Go Back', 'wp-ultimo'),
'back_button_label' => __('&larr; Go Back', 'wp-multisite-waas'),
];
}
@ -150,8 +150,8 @@ class Signup_Field_Submit_Button extends Base_Signup_Field {
return [
'enable_go_back_button' => [
'type' => 'toggle',
'title' => __('Add "Go Back" button', 'wp-ultimo'),
'desc' => __('Enable this option to add a "Go Back" button. Useful for multi-step checkout forms.', 'wp-ultimo'),
'title' => __('Add "Go Back" button', 'wp-multisite-waas'),
'desc' => __('Enable this option to add a "Go Back" button. Useful for multi-step checkout forms.', 'wp-multisite-waas'),
'tooltip' => '',
'value' => 0,
'html_attr' => [
@ -160,10 +160,10 @@ class Signup_Field_Submit_Button extends Base_Signup_Field {
],
'back_button_label' => [
'type' => 'text',
'title' => __('"Go Back" Button Label', 'wp-ultimo'),
'desc' => __('Value to be used as the "Go Back" label.', 'wp-ultimo'),
'placeholder' => __('e.g. &larr; Go Back', 'wp-ultimo'),
'value' => __('&larr; Go Back', 'wp-ultimo'),
'title' => __('"Go Back" Button Label', 'wp-multisite-waas'),
'desc' => __('Value to be used as the "Go Back" label.', 'wp-multisite-waas'),
'placeholder' => __('e.g. &larr; Go Back', 'wp-multisite-waas'),
'value' => __('&larr; Go Back', 'wp-multisite-waas'),
'wrapper_html_attr' => [
'v-cloak' => '1',
'v-show' => 'enable_go_back_button',

View File

@ -55,7 +55,7 @@ class Signup_Field_Template_Selection extends Base_Signup_Field {
*/
public function get_title() {
return __('Templates', 'wp-ultimo');
return __('Templates', 'wp-multisite-waas');
}
/**
@ -68,7 +68,7 @@ class Signup_Field_Template_Selection extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a template selection section. This allows the customer to choose a pre-built site to be used as a template for the site being currently created.', 'wp-ultimo');
return __('Adds a template selection section. This allows the customer to choose a pre-built site to be used as a template for the site being currently created.', 'wp-multisite-waas');
}
/**
@ -81,7 +81,7 @@ class Signup_Field_Template_Selection extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a template selection section. This allows the customer to choose a pre-built site to be used as a template for the site being currently created.', 'wp-ultimo');
return __('Adds a template selection section. This allows the customer to choose a pre-built site to be used as a template for the site being currently created.', 'wp-multisite-waas');
}
/**
@ -139,7 +139,7 @@ class Signup_Field_Template_Selection extends Base_Signup_Field {
return [
'id' => 'template_selection',
'name' => __('Template Selection', 'wp-ultimo'),
'name' => __('Template Selection', 'wp-multisite-waas'),
'required' => true,
];
}
@ -173,8 +173,8 @@ class Signup_Field_Template_Selection extends Base_Signup_Field {
$editor_fields['template_selection_type'] = [
'type' => 'select',
'title' => __('Available templates', 'wp-ultimo'),
'desc' => __('How do you want to choose available which templates will be available.', 'wp-ultimo'),
'title' => __('Available templates', 'wp-multisite-waas'),
'desc' => __('How do you want to choose available which templates will be available.', 'wp-multisite-waas'),
'order' => 20,
'options' => [
'name' => __('Select by names'),
@ -188,9 +188,9 @@ class Signup_Field_Template_Selection extends Base_Signup_Field {
$editor_fields['template_selection_categories'] = [
'type' => 'select',
'title' => __('Template Categories', 'wp-ultimo'),
'placeholder' => __('e.g.: Landing Page, Health...', 'wp-ultimo'),
'desc' => __('Customers will be able to filter by categories during signup.', 'wp-ultimo'),
'title' => __('Template Categories', 'wp-multisite-waas'),
'placeholder' => __('e.g.: Landing Page, Health...', 'wp-multisite-waas'),
'desc' => __('Customers will be able to filter by categories during signup.', 'wp-multisite-waas'),
'order' => 21,
'options' => Site::get_all_categories(),
'html_attr' => [
@ -204,9 +204,9 @@ class Signup_Field_Template_Selection extends Base_Signup_Field {
$editor_fields['template_selection_sites'] = [
'type' => 'model',
'title' => __('Template Sites', 'wp-ultimo'),
'placeholder' => __('e.g. Template Site 1, My Agency', 'wp-ultimo'),
'desc' => __('Be sure to add the templates in the order you want them to show up.', 'wp-ultimo'),
'title' => __('Template Sites', 'wp-multisite-waas'),
'placeholder' => __('e.g. Template Site 1, My Agency', 'wp-multisite-waas'),
'desc' => __('Be sure to add the templates in the order you want them to show up.', 'wp-multisite-waas'),
'order' => 22,
'html_attr' => [
'v-model' => 'template_selection_sites',
@ -231,9 +231,9 @@ class Signup_Field_Template_Selection extends Base_Signup_Field {
$editor_fields['hide_template_selection_when_pre_selected'] = [
'type' => 'toggle',
'title' => __('Hide when Pre-Selected', 'wp-ultimo'),
'desc' => __('Prevent customers from seeing this field when a template was already selected via the URL.', 'wp-ultimo'),
'tooltip' => __('If the template selection field is the only field in the current step, the step will be skipped.', 'wp-ultimo'),
'title' => __('Hide when Pre-Selected', 'wp-multisite-waas'),
'desc' => __('Prevent customers from seeing this field when a template was already selected via the URL.', 'wp-multisite-waas'),
'tooltip' => __('If the template selection field is the only field in the current step, the step will be skipped.', 'wp-multisite-waas'),
'value' => 0,
'order' => 23,
'html_attr' => [
@ -248,8 +248,8 @@ class Signup_Field_Template_Selection extends Base_Signup_Field {
'fields' => [
'template_selection_template' => [
'type' => 'select',
'title' => __('Template Selector Template', 'wp-ultimo'),
'placeholder' => __('Select your Template', 'wp-ultimo'),
'title' => __('Template Selector Template', 'wp-multisite-waas'),
'placeholder' => __('Select your Template', 'wp-multisite-waas'),
'options' => [$this, 'get_template_selection_templates'],
'wrapper_classes' => 'wu-flex-grow',
'html_attr' => [
@ -265,7 +265,7 @@ class Signup_Field_Template_Selection extends Base_Signup_Field {
// 'order' => 99,
// 'wrapper_classes' => 'sm:wu-p-0 sm:wu-block',
// 'classes' => '',
// 'desc' => sprintf('<div class="wu-p-4 wu-bg-blue-100 wu-text-grey-600">%s</div>', __('Want to add customized template selection templates?<br><a target="_blank" class="wu-no-underline" href="https://help.wpultimo.com/article/343-customize-your-checkout-flow-using-field-templates">See how you can do that here</a>.', 'wp-ultimo')),
// 'desc' => sprintf('<div class="wu-p-4 wu-bg-blue-100 wu-text-grey-600">%s</div>', __('Want to add customized template selection templates?<br><a target="_blank" class="wu-no-underline" href="https://help.wpultimo.com/article/343-customize-your-checkout-flow-using-field-templates">See how you can do that here</a>.', 'wp-multisite-waas')),
// );
return $editor_fields;
@ -356,7 +356,7 @@ class Signup_Field_Template_Selection extends Base_Signup_Field {
$template_class = Field_Templates_Manager::get_instance()->get_template_class('template_selection', $attributes['template_selection_template']);
$content = $template_class ? $template_class->render_container($template_attributes, $this) : __('Template does not exist.', 'wp-ultimo');
$content = $template_class ? $template_class->render_container($template_attributes, $this) : __('Template does not exist.', 'wp-multisite-waas');
$checkout_fields[ $attributes['id'] ] = [
'type' => 'note',

View File

@ -69,7 +69,7 @@ class Signup_Field_Terms_Of_Use extends Base_Signup_Field {
*/
public function get_title() {
return __('Terms of Use', 'wp-ultimo');
return __('Terms of Use', 'wp-multisite-waas');
}
/**
@ -82,7 +82,7 @@ class Signup_Field_Terms_Of_Use extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a terms and conditions checkbox that must be marked before the account/site can be created.', 'wp-ultimo');
return __('Adds a terms and conditions checkbox that must be marked before the account/site can be created.', 'wp-multisite-waas');
}
/**
@ -95,7 +95,7 @@ class Signup_Field_Terms_Of_Use extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a terms and conditions checkbox that must be marked before the account/site can be created.', 'wp-ultimo');
return __('Adds a terms and conditions checkbox that must be marked before the account/site can be created.', 'wp-multisite-waas');
}
/**
@ -123,7 +123,7 @@ class Signup_Field_Terms_Of_Use extends Base_Signup_Field {
public function defaults() {
return [
'tou_name' => __('I agree with the terms of use.', 'wp-ultimo'),
'tou_name' => __('I agree with the terms of use.', 'wp-multisite-waas'),
];
}
@ -148,7 +148,7 @@ class Signup_Field_Terms_Of_Use extends Base_Signup_Field {
return [
'id' => 'terms_of_use',
'name' => __('Terms of Use', 'wp-ultimo'),
'name' => __('Terms of Use', 'wp-multisite-waas'),
];
}
@ -164,15 +164,15 @@ class Signup_Field_Terms_Of_Use extends Base_Signup_Field {
'tou_name' => [
'order' => 10,
'type' => 'text',
'title' => __('Terms Checkbox Label', 'wp-ultimo'),
'placeholder' => __('e.g. I agree with the terms of use.', 'wp-ultimo'),
'title' => __('Terms Checkbox Label', 'wp-multisite-waas'),
'placeholder' => __('e.g. I agree with the terms of use.', 'wp-multisite-waas'),
],
'tou_url' => [
'order' => 20,
'type' => 'url',
'title' => __('Link to the Terms Page', 'wp-ultimo'),
'desc' => __('Enter the link to the terms of use content.', 'wp-ultimo'),
'placeholder' => __('e.g. https://yoursite.com/terms', 'wp-ultimo'),
'title' => __('Link to the Terms Page', 'wp-multisite-waas'),
'desc' => __('Enter the link to the terms of use content.', 'wp-multisite-waas'),
'placeholder' => __('e.g. https://yoursite.com/terms', 'wp-multisite-waas'),
],
];
}
@ -189,7 +189,7 @@ class Signup_Field_Terms_Of_Use extends Base_Signup_Field {
$checkout_fields = [];
$tou_link = sprintf('<a href="%s" target="_blank">%s</a>', $attributes['tou_url'], __('Read here', 'wp-ultimo'));
$tou_link = sprintf('<a href="%s" target="_blank">%s</a>', $attributes['tou_url'], __('Read here', 'wp-multisite-waas'));
$checkout_fields['terms_of_use'] = [
'type' => 'checkbox',

View File

@ -55,7 +55,7 @@ class Signup_Field_Text extends Base_Signup_Field {
*/
public function get_title() {
return __('Text', 'wp-ultimo');
return __('Text', 'wp-multisite-waas');
}
/**
@ -68,7 +68,7 @@ class Signup_Field_Text extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds a text field that the customer can fill with arbitrary data.', 'wp-ultimo');
return __('Adds a text field that the customer can fill with arbitrary data.', 'wp-multisite-waas');
}
/**
@ -81,7 +81,7 @@ class Signup_Field_Text extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds a text field that the customer can fill with arbitrary data.', 'wp-ultimo');
return __('Adds a text field that the customer can fill with arbitrary data.', 'wp-multisite-waas');
}
/**

View File

@ -69,7 +69,7 @@ class Signup_Field_Username extends Base_Signup_Field {
*/
public function get_title() {
return __('Username', 'wp-ultimo');
return __('Username', 'wp-multisite-waas');
}
/**
@ -82,7 +82,7 @@ class Signup_Field_Username extends Base_Signup_Field {
*/
public function get_description() {
return __('Adds an username field. This username will be used to create the WordPress user.', 'wp-ultimo');
return __('Adds an username field. This username will be used to create the WordPress user.', 'wp-multisite-waas');
}
/**
@ -95,7 +95,7 @@ class Signup_Field_Username extends Base_Signup_Field {
*/
public function get_tooltip() {
return __('Adds an username field. This username will be used to create the WordPress user.', 'wp-ultimo');
return __('Adds an username field. This username will be used to create the WordPress user.', 'wp-multisite-waas');
}
/**
@ -167,8 +167,8 @@ class Signup_Field_Username extends Base_Signup_Field {
return [
'auto_generate_username' => [
'type' => 'toggle',
'title' => __('Auto-generate', 'wp-ultimo'),
'desc' => __('Check this option to auto-generate this field based on the email address of the customer.', 'wp-ultimo'),
'title' => __('Auto-generate', 'wp-multisite-waas'),
'desc' => __('Check this option to auto-generate this field based on the email address of the customer.', 'wp-multisite-waas'),
'tooltip' => '',
'value' => 0,
'html_attr' => [

View File

@ -78,7 +78,7 @@ class Base_Field_Template {
*/
public function get_title() {
return __('Field Template', 'wp-ultimo');
return __('Field Template', 'wp-multisite-waas');
}
/**
@ -91,7 +91,7 @@ class Base_Field_Template {
*/
public function get_description() {
return __('Description', 'wp-ultimo');
return __('Description', 'wp-multisite-waas');
}
/**

View File

@ -64,7 +64,7 @@ class Simple_Order_Bump_Field_Template extends Base_Field_Template {
*/
public function get_title() {
return __('Simple', 'wp-ultimo');
return __('Simple', 'wp-multisite-waas');
}
/**
@ -77,7 +77,7 @@ class Simple_Order_Bump_Field_Template extends Base_Field_Template {
*/
public function get_description() {
return __('A simple layout with minimal styling, just enough to make it usable out-of-the-box.', 'wp-ultimo');
return __('A simple layout with minimal styling, just enough to make it usable out-of-the-box.', 'wp-multisite-waas');
}
/**

View File

@ -64,7 +64,7 @@ class Clean_Order_Summary_Field_Template extends Base_Field_Template {
*/
public function get_title() {
return __('Clean', 'wp-ultimo');
return __('Clean', 'wp-multisite-waas');
}
/**
@ -77,7 +77,7 @@ class Clean_Order_Summary_Field_Template extends Base_Field_Template {
*/
public function get_description() {
return __('A simple layout with minimal styling, just enough to make it usable out-of-the-box.', 'wp-ultimo');
return __('A simple layout with minimal styling, just enough to make it usable out-of-the-box.', 'wp-multisite-waas');
}
/**

View File

@ -64,7 +64,7 @@ class Clean_Period_Selection_Field_Template extends Base_Field_Template {
*/
public function get_title() {
return __('Clean', 'wp-ultimo');
return __('Clean', 'wp-multisite-waas');
}
/**
@ -77,7 +77,7 @@ class Clean_Period_Selection_Field_Template extends Base_Field_Template {
*/
public function get_description() {
return __('A simple template with clean markup and no styling, ready to be customized with custom CSS.', 'wp-ultimo');
return __('A simple template with clean markup and no styling, ready to be customized with custom CSS.', 'wp-multisite-waas');
}
/**

View File

@ -64,7 +64,7 @@ class Legacy_Period_Selection_Field_Template extends Base_Field_Template {
*/
public function get_title() {
return __('Legacy', 'wp-ultimo');
return __('Legacy', 'wp-multisite-waas');
}
/**
@ -77,7 +77,7 @@ class Legacy_Period_Selection_Field_Template extends Base_Field_Template {
*/
public function get_description() {
return __('Implementation of the layout that shipped with WP Multisite WaaS < 1.10.X.', 'wp-ultimo');
return __('Implementation of the layout that shipped with WP Multisite WaaS < 1.10.X.', 'wp-multisite-waas');
}
/**

View File

@ -64,7 +64,7 @@ class Legacy_Pricing_Table_Field_Template extends Base_Field_Template {
*/
public function get_title() {
return __('Legacy', 'wp-ultimo');
return __('Legacy', 'wp-multisite-waas');
}
/**
@ -77,7 +77,7 @@ class Legacy_Pricing_Table_Field_Template extends Base_Field_Template {
*/
public function get_description() {
return __('Implementation of the layout that shipped with WP Ultimo < 1.10.X.', 'wp-ultimo');
return __('Implementation of the layout that shipped with WP Ultimo < 1.10.X.', 'wp-multisite-waas');
}
/**

View File

@ -42,7 +42,7 @@ class List_Pricing_Table_Field_Template extends Base_Field_Template {
*/
public function get_title() {
return __('Simple List', 'wp-ultimo');
return __('Simple List', 'wp-multisite-waas');
}
/**
@ -55,7 +55,7 @@ class List_Pricing_Table_Field_Template extends Base_Field_Template {
*/
public function get_description() {
return __('Simple stylized list with price, recurrence, and the plan description.', 'wp-ultimo');
return __('Simple stylized list with price, recurrence, and the plan description.', 'wp-multisite-waas');
}
/**

View File

@ -64,7 +64,7 @@ class Clean_Steps_Field_Template extends Base_Field_Template {
*/
public function get_title() {
return __('Clean', 'wp-ultimo');
return __('Clean', 'wp-multisite-waas');
}
/**
@ -77,7 +77,7 @@ class Clean_Steps_Field_Template extends Base_Field_Template {
*/
public function get_description() {
return __('A simple layout with minimal styling, just enough to make it usable out-of-the-box.', 'wp-ultimo');
return __('A simple layout with minimal styling, just enough to make it usable out-of-the-box.', 'wp-multisite-waas');
}
/**

View File

@ -64,7 +64,7 @@ class Legacy_Steps_Field_Template extends Base_Field_Template {
*/
public function get_title() {
return __('Legacy', 'wp-ultimo');
return __('Legacy', 'wp-multisite-waas');
}
/**
@ -77,7 +77,7 @@ class Legacy_Steps_Field_Template extends Base_Field_Template {
*/
public function get_description() {
return __('Implementation of the layout that shipped with WP Ultimo < 1.10.X.', 'wp-ultimo');
return __('Implementation of the layout that shipped with WP Ultimo < 1.10.X.', 'wp-multisite-waas');
}
/**

View File

@ -64,7 +64,7 @@ class Minimal_Steps_Field_Template extends Base_Field_Template {
*/
public function get_title() {
return __('Minimal', 'wp-ultimo');
return __('Minimal', 'wp-multisite-waas');
}
/**
@ -77,7 +77,7 @@ class Minimal_Steps_Field_Template extends Base_Field_Template {
*/
public function get_description() {
return __('A simple template with clean markup and no styling, ready to be customized with custom CSS.', 'wp-ultimo');
return __('A simple template with clean markup and no styling, ready to be customized with custom CSS.', 'wp-multisite-waas');
}
/**

View File

@ -64,7 +64,7 @@ class Clean_Template_Selection_Field_Template extends Base_Field_Template {
*/
public function get_title() {
return __('Clean', 'wp-ultimo');
return __('Clean', 'wp-multisite-waas');
}
/**
@ -77,7 +77,7 @@ class Clean_Template_Selection_Field_Template extends Base_Field_Template {
*/
public function get_description(): string {
return __('A simple layout with minimal styling, just enough to make it usable out-of-the-box.', 'wp-ultimo');
return __('A simple layout with minimal styling, just enough to make it usable out-of-the-box.', 'wp-multisite-waas');
}
/**

View File

@ -53,7 +53,7 @@ class Legacy_Template_Selection_Field_Template extends Base_Field_Template {
*/
public function get_title() {
return __('Legacy', 'wp-ultimo');
return __('Legacy', 'wp-multisite-waas');
}
/**
@ -66,7 +66,7 @@ class Legacy_Template_Selection_Field_Template extends Base_Field_Template {
*/
public function get_description() {
return __('Implementation of the layout that shipped with WP Ultimo < 1.10.X.', 'wp-ultimo');
return __('Implementation of the layout that shipped with WP Ultimo < 1.10.X.', 'wp-multisite-waas');
}
/**

View File

@ -53,7 +53,7 @@ class Minimal_Template_Selection_Field_Template extends Base_Field_Template {
*/
public function get_title() {
return __('Minimal', 'wp-ultimo');
return __('Minimal', 'wp-multisite-waas');
}
/**
@ -66,7 +66,7 @@ class Minimal_Template_Selection_Field_Template extends Base_Field_Template {
*/
public function get_description() {
return __('A simple template with clean markup and no styling, ready to be customized with custom CSS.', 'wp-ultimo');
return __('A simple template with clean markup and no styling, ready to be customized with custom CSS.', 'wp-multisite-waas');
}
/**