Prep Plugin for release on WordPress.org ()

* 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
.phpcs.xml.dist
assets
css
img
flags
1x1
ad.svgae.svgaf.svgag.svgai.svgal.svgam.svgao.svgaq.svgar.svgas.svgat.svgau.svgaw.svgax.svgaz.svgba.svgbb.svgbd.svgbe.svgbf.svgbg.svgbh.svgbi.svgbj.svgbl.svgbm.svgbn.svgbo.svgbq.svgbr.svgbs.svgbt.svgbv.svgbw.svgby.svgbz.svgca.svgcc.svgcd.svgcf.svgcg.svgch.svgci.svgck.svgcl.svgcm.svgcn.svgco.svgcr.svgcu.svgcv.svgcw.svgcx.svgcy.svgcz.svgde.svgdj.svgdk.svgdm.svgdo.svgdz.svgec.svgee.svgeg.svgeh.svger.svges-ca.svges-ga.svges.svget.svgeu.svgfi.svgfj.svgfk.svgfm.svgfo.svgfr.svgga.svggb-eng.svggb-nir.svggb-sct.svggb-wls.svggb.svggd.svgge.svggf.svggg.svggh.svggi.svggl.svggm.svggn.svggp.svggq.svggr.svggs.svggt.svggu.svggw.svggy.svghk.svghm.svghn.svghr.svght.svghu.svgid.svgie.svgil.svgim.svgin.svgio.svgiq.svgir.svgis.svgit.svgje.svgjm.svgjo.svgjp.svgke.svgkg.svgkh.svgki.svgkm.svgkn.svgkp.svgkr.svgkw.svgky.svgkz.svgla.svglb.svglc.svgli.svglk.svglr.svgls.svglt.svglu.svglv.svgly.svgma.svgmc.svgmd.svgme.svgmf.svgmg.svgmh.svgmk.svgml.svgmm.svgmn.svgmo.svgmp.svgmq.svgmr.svgms.svgmt.svgmu.svgmv.svgmw.svgmx.svgmy.svgmz.svgna.svgnc.svgne.svgnf.svgng.svgni.svgnl.svgno.svgnp.svgnr.svgnu.svgnz.svgom.svgpa.svgpe.svgpf.svgpg.svgph.svgpk.svgpl.svgpm.svgpn.svgpr.svgps.svgpt.svgpw.svgpy.svgqa.svgre.svgro.svgrs.svgru.svgrw.svgsa.svgsb.svgsc.svgsd.svgse.svgsg.svgsh.svgsi.svgsj.svgsk.svgsl.svgsm.svgsn.svgso.svgsr.svgss.svgst.svgsv.svgsx.svgsy.svgsz.svgtc.svgtd.svgtf.svgtg.svgth.svgtj.svgtk.svgtl.svgtm.svgtn.svgto.svgtr.svgtt.svgtv.svgtw.svgtz.svgua.svgug.svgum.svgun.svgus.svguy.svguz.svgva.svgvc.svgve.svgvg.svgvi.svgvn.svgvu.svgwf.svgws.svgxk.svgye.svgyt.svgza.svgzm.svgzw.svg
4x3
ad.svgae.svgaf.svgag.svgai.svgal.svgam.svgao.svgaq.svgar.svgas.svgat.svgau.svgaw.svgax.svgaz.svgba.svgbb.svgbd.svgbe.svgbf.svgbg.svgbh.svgbi.svgbj.svgbl.svgbm.svgbn.svgbo.svgbq.svgbr.svgbs.svgbt.svgbv.svgbw.svgby.svgbz.svgca.svgcc.svgcd.svgcf.svgcg.svgch.svgci.svgck.svgcl.svgcm.svgcn.svgco.svgcr.svgcu.svgcv.svgcw.svgcx.svgcy.svgcz.svgde.svgdj.svgdk.svgdm.svgdo.svgdz.svgec.svgee.svgeg.svgeh.svger.svges-ca.svges-ga.svges.svget.svgeu.svgfi.svgfj.svgfk.svgfm.svgfo.svgfr.svgga.svggb-eng.svggb-nir.svggb-sct.svggb-wls.svggb.svggd.svgge.svggf.svggg.svggh.svggi.svggl.svggm.svggn.svggp.svggq.svggr.svggs.svggt.svggu.svggw.svggy.svghk.svghm.svghn.svghr.svght.svghu.svgid.svgie.svgil.svgim.svgin.svgio.svgiq.svgir.svgis.svgit.svgje.svgjm.svgjo.svgjp.svgke.svgkg.svgkh.svgki.svgkm.svgkn.svgkp.svgkr.svgkw.svgky.svgkz.svgla.svglb.svglc.svgli.svglk.svglr.svgls.svglt.svglu.svglv.svgly.svgma.svgmc.svgmd.svgme.svgmf.svgmg.svgmh.svgmk.svgml.svgmm.svgmn.svgmo.svgmp.svgmq.svgmr.svgms.svgmt.svgmu.svgmv.svgmw.svgmx.svgmy.svgmz.svgna.svgnc.svgne.svgnf.svgng.svgni.svgnl.svgno.svgnp.svgnr.svgnu.svgnz.svgom.svgpa.svgpe.svgpf.svgpg.svgph.svgpk.svgpl.svgpm.svgpn.svgpr.svgps.svgpt.svgpw.svgpy.svgqa.svgre.svgro.svgrs.svgru.svgrw.svgsa.svgsb.svgsc.svgsd.svgse.svgsg.svgsh.svgsi.svgsj.svgsk.svgsl.svgsm.svgsn.svgso.svgsr.svgss.svgst.svgsv.svgsx.svgsy.svgsz.svgtc.svgtd.svgtf.svgtg.svgth.svgtj.svgtk.svgtl.svgtm.svgtn.svgto.svgtr.svgtt.svgtv.svgtw.svgtz.svgua.svgug.svgum.svgun.svgus.svguy.svguz.svgva.svgvc.svgve.svgvg.svgvi.svgvn.svgvu.svgwf.svgws.svgxk.svgye.svgyt.svgza.svgzm.svgzw.svg
logo.pnglogo.webp
js
composer.jsoncomposer.lock
data
inc
admin-pages
class-about-admin-page.phpclass-base-admin-page.phpclass-base-customer-facing-admin-page.phpclass-broadcast-edit-admin-page.phpclass-broadcast-list-admin-page.phpclass-checkout-form-edit-admin-page.phpclass-checkout-form-list-admin-page.phpclass-customer-edit-admin-page.phpclass-customer-list-admin-page.phpclass-customizer-admin-page.phpclass-dashboard-admin-page.phpclass-discount-code-edit-admin-page.phpclass-discount-code-list-admin-page.phpclass-domain-edit-admin-page.phpclass-domain-list-admin-page.phpclass-edit-admin-page.phpclass-email-edit-admin-page.phpclass-email-list-admin-page.phpclass-email-template-customize-admin-page.phpclass-event-list-admin-page.phpclass-event-view-admin-page.phpclass-hosting-integration-wizard-admin-page.phpclass-invoice-template-customize-admin-page.phpclass-jobs-list-admin-page.phpclass-list-admin-page.phpclass-membership-edit-admin-page.phpclass-membership-list-admin-page.phpclass-migration-alert-admin-page.phpclass-payment-edit-admin-page.phpclass-payment-list-admin-page.phpclass-placeholders-admin-page.phpclass-product-edit-admin-page.phpclass-product-list-admin-page.phpclass-settings-admin-page.phpclass-setup-wizard-admin-page.phpclass-shortcodes-admin-page.phpclass-site-edit-admin-page.phpclass-site-list-admin-page.phpclass-system-info-admin-page.phpclass-tax-rates-admin-page.phpclass-template-previewer-customize-admin-page.phpclass-top-admin-nav-menu.phpclass-view-logs-admin-page.phpclass-webhook-edit-admin-page.phpclass-webhook-list-admin-page.phpclass-wizard-admin-page.php
customer-panel
debug
api
builders
checkout
class-cart.phpclass-checkout-pages.phpclass-checkout.phpclass-legacy-checkout.phpclass-line-item.php
signup-fields
class-admin-notices.phpclass-ajax.phpclass-api.phpclass-async-calls.phpclass-dashboard-widgets.phpclass-domain-mapping.phpclass-faker.phpclass-helper.phpclass-hooks.phpclass-light-ajax.phpclass-logger.phpclass-maintenance-mode.phpclass-newsletter.phpclass-requirements.phpclass-scripts.phpclass-session-cookie.phpclass-settings.phpclass-sunrise.phpclass-user-switching.phpclass-views.phpclass-whitelabel.phpclass-wp-ultimo.php
compat
country
database
debug
deprecated
development
domain-mapping
duplication
functions
gateways
helpers
installers
integrations
internal
invoices
limitations
limits
list-tables
managers
models
objects
site-templates
sso
tax
traits
ui
lang
loco.xmlpackage-lock.jsonpackage.jsonphpstan.neon.distsetuptest.shsunrise.php
tests/Admin_Pages
utils/rector
views
about.phpadmin-notices.php
admin-pages
base
broadcast
checkout
customers
dashboard-statistics
dashboard-widgets
domain
email
emails
events
invoice
legacy
limitations
memberships
payments
settings
shortcodes
sites
system-info
taxes
ui
wizards
wp-multisite-waas.php

@@ -6,20 +6,14 @@
*/
?>
<div id="dashboard-filters" class="wp-filter wu-filter">
<ul class="filter-links">
<?php foreach ($views as $tab => $view) : ?>
<li class="<?php echo $tab === $active_tab ? 'current' : ''; ?>">
<a href="<?php echo esc_attr($view['url']); ?>"
class="<?php echo $tab === $active_tab ? 'current wu-font-medium' : ''; ?> wu-loader">
<?php echo $view['label']; ?>
</a>
</li>
<?php endforeach; ?>
<?php foreach ($views as $tab => $view) : ?>
<li class="<?php echo esc_attr($tab === $active_tab ? 'current' : ''); ?>">
<a href="<?php echo esc_url($view['url']); ?>" class="wu-loader <?php echo esc_attr($tab === $active_tab ? 'current wu-font-medium' : ''); ?>">
<?php echo esc_html($view['label']); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<ul class="filter-links sm:wu-float-right sm:wu-w-1/2 lg:wu-w-1/4 wu--mx-2 wu-block sm:wu-inline-block">
@@ -29,38 +23,29 @@
id="wu-date-range"
style="min-height: 28px;"
class="wu-border-0 wu-border-l wu-border-gray-300 wu-bg-gray-100 wu-w-full wu-text-right wu-py-3 wu-outline-none wu-rounded-none"
placeholder="Loading..."
placeholder="<?php esc_html_e('Loading...'); ?>'"
>
</li>
</ul>
<ul class="wu-hidden md:wu-inline-block filter-links sm:wu-float-right md:wu-mr-6">
<?php foreach ($preset_options as $slug => $preset) : ?>
<?php
$link = add_query_arg(
$link = add_query_arg(
[
'start_date' => $preset['start_date'],
'end_date' => $preset['end_date'],
'preset' => $slug,
]
);
$request_slug = wu_request('preset', 'none');
?>
<li class="<?php echo $slug === $request_slug ? 'current' : ''; ?>">
<a href="<?php echo esc_attr($link); ?>"
class="<?php echo $slug === $request_slug ? 'current wu-font-medium' : ''; ?> wu-loader">
<?php echo $preset['label']; ?>
</a>
</li>
<?php endforeach; ?>
<li class="<?php echo esc_attr($slug === $request_slug ? 'current' : ''); ?>">
<a href="<?php echo esc_url($link); ?>" class="wu-loader <?php echo esc_attr($slug === $request_slug ? 'current wu-font-medium' : ''); ?>">
<?php echo esc_html($preset['label']); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>

@@ -7,37 +7,37 @@
?>
<div class="wu-styling">
<div class="wu-widget-inset">
<div class="wu-widget-inset">
<?php
<?php
$data = [];
$slug = 'signup_countries';
$headers = [
__('Country', 'wp-ultimo'),
__('Customer Count', 'wp-ultimo'),
];
$data = [];
$slug = 'signup_countries';
$headers = [
__('Country', 'wp-multisite-waas'),
__('Customer Count', 'wp-multisite-waas'),
];
foreach ($countries as $country_code => $count) {
$line = [
wu_get_country_name($country_code),
$count,
];
foreach ($countries as $country_code => $count) {
$line = [
wu_get_country_name($country_code),
$count,
];
$data[] = $line;
} // end foreach;
$data[] = $line;
}
$page->render_csv_button(
[
'headers' => $headers,
'data' => $data,
'slug' => $slug,
]
);
$page->render_csv_button(
[
'headers' => $headers,
'data' => $data,
'slug' => $slug,
]
);
?>
?>
</div>
</div>
</div>
@@ -45,68 +45,61 @@ $page->render_csv_button(
<div class="wu-advanced-filters wu--mx-3 wu--mb-3 wu-mt-3">
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<th><?php _e('Country', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Customer Count', 'wp-ultimo'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($countries as $country_code => $count) : ?>
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<td>
<th><?php esc_html_e('Country', 'wp-multisite-waas'); ?></th>
<th class="wu-text-right"><?php esc_html_e('Customer Count', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($countries as $country_code => $count) : ?>
<tr>
<td>
<?php
printf(
'<span class="wu-flag-icon wu-w-5 wu-mr-1" %s>%s</span>',
wu_tooltip_text(esc_html(wu_get_country_name($country_code))), // phpcs:ignore WordPress.Security.EscapeOutput
esc_html(wu_get_flag_emoji($country_code)),
);
?>
<?php echo esc_html(wu_get_country_name($country_code)); ?>
</td>
<td class="wu-text-right"><?php echo esc_html($count); ?></td>
</tr>
<?php
printf(
'<span class="wu-flag-icon wu-flag-icon-%s wu-w-5 wu-mr-1" %s></span>',
strtolower($country_code),
wu_tooltip_text(wu_get_country_name($country_code))
);
$state_list = wu_get_states_of_customers($country_code);
$_state_count = 0;
?>
<?php echo wu_get_country_name($country_code); ?>
</td>
<td class="wu-text-right"><?php echo $count; ?></td>
</tr>
<?php
<?php foreach ($state_list as $state => $state_count) : ?>
<tr>
<td class="wu-text-xs">|&longrightarrow; <?php echo esc_html($state); ?></td>
<td class="wu-text-right"><?php echo esc_html($state_count); ?></td>
</tr>
<?php endforeach; ?>
$state_list = wu_get_states_of_customers($country_code);
$_state_count = 0;
?>
<?php
foreach ($state_list as $state => $state_count) :
$_state_count += $state_count;
?>
<tr>
<td class="wu-text-xs">|&longrightarrow; <?php echo $state; ?></td>
<td class="wu-text-right"><?php echo $state_count; ?></td>
</tr>
<?php if ($state_list && $count - $_state_count >= 0) : ?>
<tr>
<td class="wu-text-xs">|&longrightarrow; <?php esc_html_e('Other', 'wp-multisite-waas'); ?></td>
<td class="wu-text-right"><?php echo esc_html($count - $_state_count); ?></td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($state_list && $count - $_state_count >= 0) : ?>
</tbody>
<tr>
<td class="wu-text-xs">|&longrightarrow; <?php _e('Other', 'wp-ultimo'); ?></td>
<td class="wu-text-right"><?php echo $count - $_state_count; ?></td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
</tbody>
</table>
</table>
</div>
@@ -114,7 +107,7 @@ $page->render_csv_button(
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
<?php _e('No countries registered yet.', 'wp-ultimo'); ?>
<?php esc_html_e('No countries registered yet.', 'wp-multisite-waas'); ?>
</div>

@@ -8,37 +8,35 @@
<div class="wu-styling">
<div class="wu-widget-inset">
<div class="wu-widget-inset">
<?php
<?php
$data = [];
$slug = 'signup_forms';
$headers = [
__('Checkout Form', 'wp-multisite-waas'),
__('Signups', 'wp-multisite-waas'),
];
$data = [];
$slug = 'signup_forms';
$headers = [
__('Checkout Form', 'wp-ultimo'),
__('Signups', 'wp-ultimo'),
];
foreach ($forms as $form) {
$line = [
esc_html($form->signup_form),
intval($form->count), // Ensure count is an integer and properly escaped
];
foreach ($forms as $form) {
$line = [
$form->signup_form,
$form->count,
];
$data[] = $line;
}
$data[] = $line;
} // end foreach;
$page->render_csv_button(
[
'headers' => $headers,
'data' => $data,
'slug' => $slug,
]
);
?>
$page->render_csv_button(
[
'headers' => $headers,
'data' => $data,
'slug' => $slug,
]
);
?>
</div>
</div>
</div>
@@ -46,34 +44,34 @@ $page->render_csv_button(
<div class="wu-advanced-filters wu--mx-3 wu--mb-3 wu-mt-3">
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<th><?php _e('Checkout Form', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Signups', 'wp-ultimo'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($forms as $form) : ?>
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<td>
<?php echo $form->signup_form; ?>
<?php if ('by-admin' === $form->signup_form) : ?>
<?php echo wu_tooltip(__('Customers created via the admin panel, by super admins.', 'wp-ultimo')); ?>
<?php endif; ?>
</td>
<td class="wu-text-right"><?php echo $form->count; ?></td>
<th><?php esc_html_e('Checkout Form', 'wp-multisite-waas'); ?></th>
<th class="wu-text-right"><?php esc_html_e('Signups', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
<?php endforeach; ?>
<tbody>
</tbody>
<?php foreach ($forms as $form) : ?>
</table>
<tr>
<td>
<?php echo esc_html($form->signup_form); ?>
<?php if ('by-admin' === $form->signup_form) : ?>
<?php echo wu_tooltip(__('Customers created via the admin panel, by super admins.', 'wp-multisite-waas')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif; ?>
</td>
<td class="wu-text-right"><?php echo intval($form->count); ?></td> <!-- Ensure count is an integer and properly escaped -->
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
@@ -81,7 +79,7 @@ $page->render_csv_button(
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
<?php _e('No data yet.', 'wp-ultimo'); ?>
<?php esc_html_e('No data yet.', 'wp-multisite-waas'); ?>
</div>

@@ -15,8 +15,8 @@
$data = [];
$slug = 'most_visited_sites';
$headers = [
__('Site', 'wp-ultimo'),
__('Visits', 'wp-ultimo'),
__('Site', 'wp-multisite-waas'),
__('Visits', 'wp-multisite-waas'),
];
foreach ($sites as $site_visits) {
@@ -28,7 +28,7 @@ foreach ($sites as $site_visits) {
];
$data[] = $line;
} // end foreach;
}
$page->render_csv_button(
[
@@ -52,8 +52,8 @@ $page->render_csv_button(
<thead>
<tr>
<th class="wu-w-8/12"><?php _e('Site', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Visits', 'wp-ultimo'); ?></th>
<th class="wu-w-8/12"><?php esc_html_e('Site', 'wp-multisite-waas'); ?></th>
<th class="wu-text-right"><?php esc_html_e('Visits', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
@@ -64,29 +64,29 @@ $page->render_csv_button(
<tr>
<td class="wu-align-middle">
<span class="wu-uppercase wu-text-xs wu-text-gray-700 wu-font-bold">
<?php echo $site_visits->site->get_title(); ?>
<?php echo esc_html($site_visits->site->get_title()); ?>
</span>
<div class="sm:wu-flex">
<a title="<?php _e('Homepage', 'wp-ultimo'); ?>" href="<?php echo esc_attr(get_home_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight">
<a title="<?php esc_html_e('Homepage', 'wp-multisite-waas'); ?>" href="<?php echo esc_attr(get_home_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight">
<span class="dashicons-wu-link1 wu-align-middle wu-mr-1"></span>
<?php _e('Homepage', 'wp-ultimo'); ?>
<?php esc_html_e('Homepage', 'wp-multisite-waas'); ?>
</a>
<a title="<?php _e('Dashboard', 'wp-ultimo'); ?>" href="<?php echo esc_attr(get_admin_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight sm:wu-mt-0 sm:wu-ml-6">
<a title="<?php esc_html_e('Dashboard', 'wp-multisite-waas'); ?>" href="<?php echo esc_attr(get_admin_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight sm:wu-mt-0 sm:wu-ml-6">
<span class="dashicons-wu-browser wu-align-middle wu-mr-1"></span>
<?php _e('Dashboard', 'wp-ultimo'); ?>
<?php esc_html_e('Dashboard', 'wp-multisite-waas'); ?>
</a>
</div>
</td>
<td class="wu-align-middle wu-text-right">
<?php printf(_n('%d visit', '%d visits', $site_visits->count, 'wp-ultimo'), $site_visits->count); ?>
<?php printf(_n('%d visit', '%d visits', $site_visits->count, 'wp-multisite-waas'), $site_visits->count); ?>
</td>
</tr>
@@ -102,7 +102,7 @@ $page->render_csv_button(
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
<?php _e('No visits registered in this period.', 'wp-ultimo'); ?>
<?php esc_html_e('No visits registered in this period.', 'wp-multisite-waas'); ?>
</div>

@@ -11,7 +11,7 @@
<span class="wu-blinking-animation">
<?php _e('Loading...', 'wp-ultimo'); ?>
<?php esc_html_e('Loading...', 'wp-multisite-waas'); ?>
</span>

@@ -6,70 +6,42 @@
*/
?>
<div class="wu-styling">
<ul class="md:wu-flex wu-my-0 wu-mx-0">
<li class="wu-p-2 wu-w-full md:wu-w-full wu-relative">
<div>
<strong class="wu-text-gray-800 wu-text-2xl md:wu-text-xl">
<?php echo $new_accounts; ?>
</strong>
</div>
<div class="wu-text-sm wu-text-gray-600">
<span class="wu-block"><?php _e('New Memberships', 'wp-ultimo'); ?></span>
</div>
</li>
<li class="wu-p-2 wu-w-full md:wu-w-full wu-relative">
<div>
<strong class="wu-text-gray-800 wu-text-2xl md:wu-text-xl">
<?php echo esc_html($new_accounts); ?>
</strong>
</div>
<div class="wu-text-sm wu-text-gray-600">
<span class="wu-block"><?php esc_html_e('New Memberships', 'wp-multisite-waas'); ?></span>
</div>
</li>
</ul>
<div class="wu--mx-3 wu--mb-3 wu-mt-2">
<table class="wp-list-table widefat fixed striped wu-border-t-1 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<th><?php _e('Product Name', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('New Memberships', 'wp-ultimo'); ?></th>
</tr>
</thead>
<tbody>
<?php if ($products) : ?>
<?php foreach ($products as $product) : ?>
<table class="wp-list-table widefat fixed striped wu-border-t-1 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<td>
<?php echo $product->name; ?>
</td>
<td class="wu-text-right">
<?php echo $product->count; ?>
</td>
<th><?php esc_html_e('Product Name', 'wp-multisite-waas'); ?></th>
<th class="wu-text-right"><?php esc_html_e('New Memberships', 'wp-multisite-waas'); ?></th>
</tr>
<?php endforeach; ?>
<?php else : ?>
<tr>
<td colspan="2">
<?php _e('No Products found.', 'wp-ultimo'); ?>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</thead>
<tbody>
<?php if ($products) : ?>
<?php foreach ($products as $product) : ?>
<tr>
<td><?php echo esc_html($product->name); ?></td>
<td class="wu-text-right"><?php echo esc_html($product->count); ?></td>
</tr>
<?php endforeach; ?>
<?php else : ?>
<tr>
<td colspan="2">
<?php esc_html_e('No Products found.', 'wp-multisite-waas'); ?>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>

@@ -9,7 +9,7 @@
<ul class="lg:wu-flex wu-my-0 wu-mx-0">
<li class="wu-p-2 wu-w-full md:wu-w-4/12 wu-relative" <?php echo wu_tooltip_text(__('MRR stands for Monthly Recurring Revenue', 'wp-ultimo')); ?>>
<li class="wu-p-2 wu-w-full md:wu-w-4/12 wu-relative" <?php echo wu_tooltip_text(__('MRR stands for Monthly Recurring Revenue', 'wp-multisite-waas')); ?>>
<div>
@@ -20,7 +20,7 @@
</div>
<div class="wu-text-md wu-text-gray-600">
<span class="wu-block"><?php _e('MRR', 'wp-ultimo'); ?></span>
<span class="wu-block"><?php esc_html_e('MRR', 'wp-multisite-waas'); ?></span>
</div>
</li>
@@ -36,7 +36,7 @@
</div>
<div class="wu-text-md wu-text-gray-600">
<span class="wu-block"><?php _e('Gross Revenue', 'wp-ultimo'); ?></span>
<span class="wu-block"><?php esc_html_e('Gross Revenue', 'wp-multisite-waas'); ?></span>
</div>
</li>
@@ -52,7 +52,7 @@
</div>
<div class="wu-text-md wu-text-gray-600">
<span class="wu-block"><?php _e('Refunded', 'wp-ultimo'); ?></span>
<span class="wu-block"><?php esc_html_e('Refunded', 'wp-multisite-waas'); ?></span>
</div>
</li>
@@ -65,8 +65,8 @@
<thead>
<tr>
<th><?php _e('Product', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Revenue', 'wp-ultimo'); ?></th>
<th><?php esc_html_e('Product', 'wp-multisite-waas'); ?></th>
<th class="wu-text-right"><?php esc_html_e('Revenue', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
@@ -91,7 +91,7 @@
<tr>
<td colspan="2">
<?php _e('No Products found.', 'wp-ultimo'); ?>
<?php esc_html_e('No Products found.', 'wp-multisite-waas'); ?>
</td>
</tr>

@@ -14,10 +14,10 @@
$data = [];
$slug = 'taxes_by_code';
$headers = [
__('Tax', 'wp-ultimo'),
__('Rate', 'wp-ultimo'),
__('Orders', 'wp-ultimo'),
__('Tax Total', 'wp-ultimo'),
__('Tax', 'wp-multisite-waas'),
__('Rate', 'wp-multisite-waas'),
__('Orders', 'wp-multisite-waas'),
__('Tax Total', 'wp-multisite-waas'),
];
foreach ($taxes_by_rate as $tax_line) {
@@ -29,7 +29,7 @@
];
$data[] = $line;
} // end foreach;
}
$page->render_csv_button(
[
@@ -45,10 +45,10 @@
<thead>
<tr>
<th><?php _e('Tax', 'wp-ultimo'); ?></th>
<th><?php _e('Rate', 'wp-ultimo'); ?></th>
<th><?php _e('Orders', 'wp-ultimo'); ?></th>
<th><?php _e('Tax Total', 'wp-ultimo'); ?></th>
<th><?php esc_html_e('Tax', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Rate', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Orders', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Tax Total', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
@@ -59,18 +59,10 @@
<?php foreach ($taxes_by_rate as $tax_line) : ?>
<tr>
<td>
<?php echo wu_get_isset($tax_line, 'title', 'No Name'); ?>
</td>
<td>
<?php echo $tax_line['tax_rate']; ?>%
</td>
<td>
<?php echo $tax_line['order_count']; ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['tax_total']); ?>
</td>
<td><?php echo esc_html(wu_get_isset($tax_line, 'title', 'No Name')); ?></td>
<td><?php echo esc_html($tax_line['tax_rate']); ?>%</td>
<td><?php echo esc_html($tax_line['order_count']); ?></td>
<td><?php echo esc_html(wu_format_currency($tax_line['tax_total'])); ?></td>
</tr>
<?php endforeach; ?>
@@ -79,7 +71,7 @@
<tr>
<td colspan="4">
<?php _e('No Taxes found.', 'wp-ultimo'); ?>
<?php esc_html_e('No Taxes found.', 'wp-multisite-waas'); ?>
</td>
</tr>

@@ -14,11 +14,11 @@
$data = [];
$slug = 'taxes_by_day';
$headers = [
__('Day', 'wp-ultimo'),
__('Orders', 'wp-ultimo'),
__('Total Sales', 'wp-ultimo'),
__('Tax Total', 'wp-ultimo'),
__('Net Profit', 'wp-ultimo'),
__('Day', 'wp-multisite-waas'),
__('Orders', 'wp-multisite-waas'),
__('Total Sales', 'wp-multisite-waas'),
__('Tax Total', 'wp-multisite-waas'),
__('Net Profit', 'wp-multisite-waas'),
];
foreach ($taxes_by_day as $day => $tax_line) {
@@ -31,7 +31,7 @@
];
$data[] = $line;
} // end foreach;
}
$page->render_csv_button(
[
@@ -47,11 +47,11 @@
<thead>
<tr>
<th class="wu-w-1/3"><?php _e('Day', 'wp-ultimo'); ?></th>
<th><?php _e('Orders', 'wp-ultimo'); ?></th>
<th><?php _e('Total Sales', 'wp-ultimo'); ?></th>
<th><?php _e('Tax Total', 'wp-ultimo'); ?></th>
<th><?php _e('Net Profit', 'wp-ultimo'); ?></th>
<th class="wu-w-1/3"><?php esc_html_e('Day', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Orders', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Total Sales', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Tax Total', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Net Profit', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
@@ -62,21 +62,11 @@
<?php foreach ($taxes_by_day as $day => $tax_line) : ?>
<tr>
<td>
<?php echo date_i18n(get_option('date_format'), strtotime($day)); ?>
</td>
<td>
<?php echo $tax_line['order_count']; ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['total']); ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['tax_total']); ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['net_profit']); ?>
</td>
<td><?php echo esc_html(date_i18n(get_option('date_format'), strtotime($day))); ?></td>
<td><?php echo intval($tax_line['order_count']); ?></td>
<td><?php echo esc_html(wu_format_currency($tax_line['total'])); ?></td>
<td><?php echo esc_html(wu_format_currency($tax_line['tax_total'])); ?></td>
<td><?php echo esc_html(wu_format_currency($tax_line['net_profit'])); ?></td>
</tr>
<?php endforeach; ?>
@@ -85,7 +75,7 @@
<tr>
<td colspan="4">
<?php _e('No Taxes found.', 'wp-ultimo'); ?>
<?php esc_html_e('No Taxes found.', 'wp-multisite-waas'); ?>
</td>
</tr>

@@ -11,7 +11,7 @@
<span class="wu-blinking-animation">
<?php _e('Loading...', 'wp-ultimo'); ?>
<?php esc_html_e('Loading...', 'wp-multisite-waas'); ?>
</span>

@@ -11,7 +11,7 @@
<span class="wu-blinking-animation">
<?php _e('Loading...', 'wp-ultimo'); ?>
<?php esc_html_e('Loading...', 'wp-multisite-waas'); ?>
</span>