From 357c2b243e834e3c05c9b4ce35fd9618adf3839d Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Mon, 25 Nov 2024 14:22:42 +1000 Subject: [PATCH] Re-register post_statuses on locale change, to ensure they have the correct label locales --- .../wp-content/plugins/wcpt/wcpt-event/class-event-loader.php | 1 + 1 file changed, 1 insertion(+) diff --git a/public_html/wp-content/plugins/wcpt/wcpt-event/class-event-loader.php b/public_html/wp-content/plugins/wcpt/wcpt-event/class-event-loader.php index 422136db8e..a4d9b33759 100644 --- a/public_html/wp-content/plugins/wcpt/wcpt-event/class-event-loader.php +++ b/public_html/wp-content/plugins/wcpt/wcpt-event/class-event-loader.php @@ -17,6 +17,7 @@ public function __construct() { add_action( 'plugins_loaded', array( $this, 'includes' ) ); add_action( 'init', array( $this, 'register_post_types' ) ); add_action( 'init', array( $this, 'register_post_statuses' ) ); + add_action( 'change_locale', array( $this, 'register_post_statuses' ) ); // Re-register them when the locale changes, to have localised statuses. add_filter( 'pre_get_posts', array( $this, 'query_public_statuses_on_archives' ) ); add_filter( 'cron_schedules', array( $this, 'add_weekly_cron_interval' ) ); }