From 116c21be5157cee88719a3d35ec1f85410d262e9 Mon Sep 17 00:00:00 2001 From: Aunshon <32583103+Aunshon@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:16:31 +0600 Subject: [PATCH] Added dokan pro update message. --- includes/Admin/Notices/Manager.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/includes/Admin/Notices/Manager.php b/includes/Admin/Notices/Manager.php index ea101e042..bec78aed8 100644 --- a/includes/Admin/Notices/Manager.php +++ b/includes/Admin/Notices/Manager.php @@ -50,7 +50,7 @@ private function init_hooks() { add_filter( 'dokan_admin_notices', [ $this, 'show_permalink_setting_notice' ] ); add_filter( 'dokan_admin_notices', [ $this, 'show_admin_logo_update_notice' ] ); add_action( 'wp_ajax_dismiss_dokan_admin_logo_update_notice', [ $this, 'dismiss_dokan_admin_logo_update_notice' ] ); - add_filter( 'dokan_admin_notices', [ $this, 'show_admin_commission_notice' ] ); + add_filter( 'dokan_admin_notices', [ $this, 'show_admin_plugin_update_notice' ] ); } /** @@ -191,7 +191,16 @@ private function dismiss_notice( string $option_name ) { wp_send_json_success(); } - public function show_admin_commission_notice( $notices ) { + /** + * Show admin notice if dokan lite is updated to v3.14.0 and dokan pro is not updated to minimum v3.14.0. + * + * @since DOKAN_SINCE + * + * @param $notices + * + * @return mixed + */ + public function show_admin_plugin_update_notice( $notices ) { if ( version_compare( DOKAN_PLUGIN_VERSION, '3.14.0', '>=' ) && defined( 'DOKAN_PRO_PLUGIN_VERSION' ) &&