From bdc97ca0fe1a5b5a20dd3e7e1604e9e9a511fc7d Mon Sep 17 00:00:00 2001 From: gkaragia <53191348+gkaragia@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:29:59 +0300 Subject: [PATCH] Rename usages of tracking base class --- includes/class-wp-job-manager-usage-tracking.php | 6 ++++-- .../class-wp-job-manager-usage-tracking-base.php | 10 +--------- .../support/class-usage-tracking-test-subclass.php | 4 ++-- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/includes/class-wp-job-manager-usage-tracking.php b/includes/class-wp-job-manager-usage-tracking.php index c658812b1..18d4d996b 100644 --- a/includes/class-wp-job-manager-usage-tracking.php +++ b/includes/class-wp-job-manager-usage-tracking.php @@ -9,7 +9,7 @@ exit; } -require dirname( __FILE__ ) . '/../lib/usage-tracking/class-usage-tracking-base.php'; +require dirname( __FILE__ ) . '/../lib/usage-tracking/class-wp-job-manager-usage-tracking-base.php'; /** * WPJM Usage Tracking subclass. @@ -182,7 +182,9 @@ protected function get_event_prefix() { } /** - * Get the text domain used in the plugin. + * Get the text domain used in the plugin. Deprecated - use 'wp-job-manager' directly. + * + * @deprecated 1.41.1 * * @return string */ diff --git a/lib/usage-tracking/class-wp-job-manager-usage-tracking-base.php b/lib/usage-tracking/class-wp-job-manager-usage-tracking-base.php index b1d0463b9..2bccf8628 100644 --- a/lib/usage-tracking/class-wp-job-manager-usage-tracking-base.php +++ b/lib/usage-tracking/class-wp-job-manager-usage-tracking-base.php @@ -70,7 +70,7 @@ abstract class WP_Job_Manager_Usage_Tracking_Base { * @throws Exception When get_instance is not implemented. */ public static function get_instance() { - throw new Exception( 'Usage Tracking subclasses must implement get_instance. See class-usage-tracking-base.php' ); + throw new Exception( 'Usage Tracking subclasses must implement get_instance. See class-wp-job-manager-usage-tracking-base.php' ); } @@ -86,14 +86,6 @@ public static function get_instance() { **/ abstract protected function get_prefix(); - /** - * Get the text domain used by this plugin. This class will add some - * strings to be translated. - * - * @return string The text domain string. - **/ - abstract protected function get_text_domain(); - /** * Determine whether usage tracking is enabled. * diff --git a/lib/usage-tracking/tests/support/class-usage-tracking-test-subclass.php b/lib/usage-tracking/tests/support/class-usage-tracking-test-subclass.php index f6d7b72b9..0caaa0123 100644 --- a/lib/usage-tracking/tests/support/class-usage-tracking-test-subclass.php +++ b/lib/usage-tracking/tests/support/class-usage-tracking-test-subclass.php @@ -1,10 +1,10 @@