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:
@ -14,8 +14,8 @@ if ($is_trial_setup) {
|
||||
|
||||
$date = wp_date(get_option('date_format'), strtotime($membership->get_date_trial_end(), wu_get_current_time('timestamp', true)));
|
||||
|
||||
$notes[] = sprintf(__('Your trial period will end on %1$s.', 'wp-ultimo'), $date);
|
||||
} // end if;
|
||||
$notes[] = sprintf(__('Your trial period will end on %1$s.', 'wp-multisite-waas'), $date);
|
||||
}
|
||||
|
||||
$original_cart = $payment->get_meta('wu_original_cart');
|
||||
|
||||
@ -34,29 +34,29 @@ if ($membership->is_recurring() && $should_auto_renew) {
|
||||
if ($original_cart->get_cart_type() === 'downgrade') {
|
||||
$subtotal = wu_format_currency($payment->get_subtotal(), $payment->get_currency());
|
||||
if ($is_trial_setup) {
|
||||
$notes[] = sprintf(__('Your updated membership will start on $1$s, from that date you will be billed %2$s %3$s.', 'wp-ultimo'), $date, $subtotal, $desc);
|
||||
$notes[] = sprintf(__('Your updated membership will start on $1$s, from that date you will be billed %2$s %3$s.', 'wp-multisite-waas'), $date, $subtotal, $desc);
|
||||
} else {
|
||||
$date_renew = wp_date(get_option('date_format'), strtotime($membership->get_date_expiration(), wu_get_current_time('timestamp', true)));
|
||||
|
||||
$notes[] = sprintf(__('Your updated membership will start on %1$s, from that date you will be billed %2$s %3$s.', 'wp-ultimo'), $date_renew, $subtotal, $desc);
|
||||
} // end if;
|
||||
$notes[] = sprintf(__('Your updated membership will start on %1$s, from that date you will be billed %2$s %3$s.', 'wp-multisite-waas'), $date_renew, $subtotal, $desc);
|
||||
}
|
||||
} elseif ($is_trial_setup) {
|
||||
$initial_amount_format = wu_format_currency($membership->get_initial_amount(), $payment->get_currency());
|
||||
|
||||
$notes[] = sprintf(__('After the first payment of %1$s you will be billed %2$s %3$s.', 'wp-ultimo'), $initial_amount_format, $recurring_total_format, $desc);
|
||||
$notes[] = sprintf(__('After the first payment of %1$s you will be billed %2$s %3$s.', 'wp-multisite-waas'), $initial_amount_format, $recurring_total_format, $desc);
|
||||
} else {
|
||||
$notes[] = sprintf(__('After this payment you will be billed %1$s %2$s.', 'wp-ultimo'), $recurring_total_format, $desc);
|
||||
} // end if;
|
||||
$notes[] = sprintf(__('After this payment you will be billed %1$s %2$s.', 'wp-multisite-waas'), $recurring_total_format, $desc);
|
||||
}
|
||||
} else {
|
||||
$recurring_total_format = wu_format_currency($recurring_total, $payment->get_currency());
|
||||
|
||||
if ($is_trial_setup) {
|
||||
$notes[] = sprintf(__('From that date, you will be billed %1$s %2$s.', 'wp-ultimo'), $recurring_total_format, $desc);
|
||||
$notes[] = sprintf(__('From that date, you will be billed %1$s %2$s.', 'wp-multisite-waas'), $recurring_total_format, $desc);
|
||||
} else {
|
||||
$notes[] = sprintf(__('After this payment you will be billed %1$s.', 'wp-ultimo'), $desc);
|
||||
} // end if;
|
||||
} // end if;
|
||||
} // end if;
|
||||
$notes[] = sprintf(__('After this payment you will be billed %1$s.', 'wp-multisite-waas'), $desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$note = implode(' ', $notes);
|
||||
|
||||
@ -66,7 +66,7 @@ $subtotal = 0;
|
||||
|
||||
<form id="wu-paypal-express-confirm-form" class="wu-styling" action="<?php echo esc_url(add_query_arg('wu-confirm', 'paypal')); ?>" method="post">
|
||||
<div class="wu-confirm-details" id="billing_info">
|
||||
<h2><?php _e('Please confirm your payment', 'wp-ultimo'); ?></h2>
|
||||
<h2><?php esc_html_e('Please confirm your payment', 'wp-multisite-waas'); ?></h2>
|
||||
|
||||
<div class="wu-text-sm wu-mb-4 wu-rounded-lg wu-border wu-border-gray-300 wu-bg-white wu-border-solid wu-shadow-sm wu-px-6 wu-py-4">
|
||||
<span class="wu-font-semibold wu-block wu-text-gray-900">
|
||||
@ -75,8 +75,8 @@ $subtotal = 0;
|
||||
|
||||
<div class="wu-text-gray-600">
|
||||
<p>
|
||||
<?php _e('PayPal Status:', 'wp-ultimo'); ?> <?php echo ucfirst(wu_get_isset($checkout_details, 'PAYERSTATUS', 'none')); ?>
|
||||
<br><?php _e('Email:', 'wp-ultimo'); ?> <?php echo wu_get_isset($checkout_details, 'EMAIL', '--'); ?>
|
||||
<?php esc_html_e('PayPal Status:', 'wp-multisite-waas'); ?> <?php echo ucfirst(wu_get_isset($checkout_details, 'PAYERSTATUS', 'none')); ?>
|
||||
<br><?php esc_html_e('Email:', 'wp-multisite-waas'); ?> <?php echo wu_get_isset($checkout_details, 'EMAIL', '--'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -85,8 +85,8 @@ $subtotal = 0;
|
||||
<table class="wu-w-full wu-mb-4">
|
||||
<thead class="wu-bg-gray-100">
|
||||
<tr>
|
||||
<th class="wu-text-left wu-py-2 wu-px-4"><?php _e('Product', 'wp-ultimo'); ?></th>
|
||||
<th class="wu-text-left wu-py-2 wu-px-4"><?php _e('Total', 'wp-ultimo'); ?></th>
|
||||
<th class="wu-text-left wu-py-2 wu-px-4"><?php esc_html_e('Product', 'wp-multisite-waas'); ?></th>
|
||||
<th class="wu-text-left wu-py-2 wu-px-4"><?php esc_html_e('Total', 'wp-multisite-waas'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@ -112,21 +112,21 @@ $subtotal = 0;
|
||||
|
||||
<tfoot class="wu-bg-gray-100">
|
||||
<tr>
|
||||
<th class="wu-text-left wu-py-2 wu-px-4"><?php _e('Subtotal', 'wp-ultimo'); ?></th>
|
||||
<th class="wu-text-left wu-py-2 wu-px-4"><?php esc_html_e('Subtotal', 'wp-multisite-waas'); ?></th>
|
||||
<th class="wu-text-left wu-py-2 wu-px-4"><?php echo wu_format_currency($subtotal, $payment->get_currency()); ?></th>
|
||||
</tr>
|
||||
|
||||
<?php foreach ($payment->get_tax_breakthrough() as $rate => $total) : ?>
|
||||
|
||||
<tr>
|
||||
<th class="wu-text-left wu-py-2 wu-px-4"><?php printf(__('Tax (%s%%)', 'wp-ultimo'), $rate); ?></th>
|
||||
<th class="wu-text-left wu-py-2 wu-px-4"><?php printf(__('Tax (%s%%)', 'wp-multisite-waas'), $rate); ?></th>
|
||||
<th class="wu-text-left wu-py-2 wu-px-4"><?php echo wu_format_currency($total, $payment->get_currency()); ?></th>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<tr>
|
||||
<th class="wu-text-left wu-py-2 wu-px-4"><?php _e("Today's Grand Total", 'wp-ultimo'); ?></th>
|
||||
<th class="wu-text-left wu-py-2 wu-px-4"><?php _e("Today's Grand Total", 'wp-multisite-waas'); ?></th>
|
||||
<th class="wu-text-left wu-py-2 wu-px-4"><?php echo wu_format_currency($payment->get_total(), $payment->get_currency()); ?></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@ -157,7 +157,7 @@ $subtotal = 0;
|
||||
|
||||
<div class="wu_submit_button">
|
||||
<button type="submit" class="button button button-primary btn-primary">
|
||||
<?php esc_attr_e('Confirm', 'wp-ultimo'); ?>
|
||||
<?php esc_attr_e('Confirm', 'wp-multisite-waas'); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user