Fix i18n deprecation notice for translating too early

This commit is contained in:
David Stone
2025-02-15 15:06:43 -07:00
parent 6d7e7cef66
commit eb29a438a5
26 changed files with 98 additions and 104 deletions

View File

@ -188,7 +188,7 @@ abstract class Base_Admin_Page {
/*
* Add forms
*/
add_action('plugins_loaded', [$this, 'register_forms']);
$this->register_forms();
/**
* Allow plugin developers to run additional things when pages are registered.

View File

@ -108,6 +108,8 @@ class Customer_Edit_Admin_Page extends Edit_Admin_Page {
wp_enqueue_style('wu-flags');
wp_enqueue_script_module('wu-flags-polyfill');
wp_enqueue_editor();
wp_enqueue_media();
@ -944,10 +946,10 @@ class Customer_Edit_Admin_Page extends Edit_Admin_Page {
if ($country_code) {
$html = sprintf(
'<span>%s</span><span class="wu-flag-icon wu-flag-icon-%s wu-w-5 wu-ml-1" %s></span>',
'<span>%s</span><span class="wu-flag-icon wu-w-5 wu-ml-1" %s>%s</span>',
$country_name,
strtolower((string) $country_code),
wu_tooltip_text($country_name)
wu_tooltip_text($country_name),
wu_get_flag_emoji((string) $country_code)
);
} else {
$html = $country_name;

View File

@ -95,7 +95,7 @@ class Checkout_Admin_Page extends \WP_Ultimo\Admin_Pages\Base_Customer_Facing_Ad
*/
public function get_title() {
return sprintf(__('Checkout', 'wp-ultimo'));
return __('Checkout', 'wp-ultimo');
}
/**