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

@ -374,14 +374,14 @@ function wu_get_membership_new_cart($membership) {
$difference = $membership->get_amount() - $cart->get_recurring_total();
if (round(abs($difference), wu_currency_decimal_filter()) > 0) {
$type_translate = $difference < 0 ? __('credit', 'wp-ultimo') : __('debit', 'wp-ultimo');
$type_translate = $difference < 0 ? __('credit', 'wp-multisite-waas') : __('debit', 'wp-multisite-waas');
$line_item_params = [
'hash' => 'ADJUSTMENT',
'type' => $difference < 0 ? 'credit' : 'fee',
// translators: %s is the type of adjustment (credit or debit).
'title' => sprintf(__('Adjustment %s', 'wp-ultimo'), $type_translate),
'description' => __('Amount adjustment based on previous deal.', 'wp-ultimo'),
'title' => sprintf(__('Adjustment %s', 'wp-multisite-waas'), $type_translate),
'description' => __('Amount adjustment based on previous deal.', 'wp-multisite-waas'),
'unit_price' => $difference,
'discountable' => false,
'taxable' => false,
@ -401,14 +401,14 @@ function wu_get_membership_new_cart($membership) {
$y = $cart->get_total();
$difference = $membership->get_initial_amount() - $cart->get_total();
$type_translate = $difference < 0 ? __('credit', 'wp-ultimo') : __('debit', 'wp-ultimo');
$type_translate = $difference < 0 ? __('credit', 'wp-multisite-waas') : __('debit', 'wp-multisite-waas');
$line_item_params = [
'hash' => 'INITADJUSTMENT',
'type' => $difference < 0 ? 'credit' : 'fee',
// translators: %s is the type of adjustment (credit or debit).
'title' => sprintf(__('Adjustment %s', 'wp-ultimo'), $type_translate),
'description' => __('Initial amount adjustment based on previous deal.', 'wp-ultimo'),
'title' => sprintf(__('Adjustment %s', 'wp-multisite-waas'), $type_translate),
'description' => __('Initial amount adjustment based on previous deal.', 'wp-multisite-waas'),
'unit_price' => $difference,
'discountable' => false,
'taxable' => false,