diff --git a/Gruntfile.js b/Gruntfile.js index 5569c61..c663abe 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -47,6 +47,7 @@ module.exports = function(grunt) { '!tests/**', '!**/Gruntfile.js', '!**/package.json', + '!**/package-lock.json', '!**/README.md', '!**/*~' ], @@ -84,4 +85,4 @@ module.exports = function(grunt) { 'copy', 'compress' ]) -}; \ No newline at end of file +}; diff --git a/changelog.txt b/changelog.txt index 6aa5e1e..47efa08 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,9 @@ +v1.0.10 -> Jan 23, 2024 +--------------------------- +- **fix:** Translation-Related Issues with Specific Menu Items in Vendor Dashboard with WPML +- **fix:** Woocommerce error notice when Dokan WPML Integration plugin is active +- **fix:** PHP warning creation of dynamic property + v1.0.8 -> Jun 08, 2023 --------------------------- - **fix:** When the admin disables vendors using one language the vendor product still shows on the shop page after switching to another language. diff --git a/dokan-wpml.php b/dokan-wpml.php index ebf67fe..b521f3c 100755 --- a/dokan-wpml.php +++ b/dokan-wpml.php @@ -3,12 +3,12 @@ * Plugin Name: Dokan - WPML Integration * Plugin URI: https://wedevs.com/ * Description: WPML and Dokan compatible package - * Version: 1.0.9 + * Version: 1.0.10 * Author: weDevs * Author URI: https://wedevs.com/ * Text Domain: dokan-wpml * WC requires at least: 5.5.0 - * WC tested up to: 8.2.2 + * WC tested up to: 8.5.1 * Domain Path: /languages/ * License: GPL2 */ @@ -53,7 +53,14 @@ class Dokan_WPML { * * @var string */ - public $wp_endpoints = 'WP Endpoints'; + public $wp_endpoints = 'WP Endpoints'; + + /* + * Appsero client + * + * @var string + */ + protected $insights; /** * Constructor for the Dokan_WPML class @@ -106,6 +113,7 @@ public function plugins_loaded() { // load appsero tracker $this->appsero_init_tracker(); + add_action( 'before_woocommerce_init', [ $this, 'declare_woocommerce_feature_compatibility' ] ); // Load all actions hook add_filter( 'dokan_forced_load_scripts', [ $this, 'load_scripts_and_style' ] ); @@ -121,11 +129,12 @@ public function plugins_loaded() { add_filter( 'body_class', [ $this, 'add_dashboard_template_class_if_wpml' ], 99 ); add_filter( 'dokan_get_current_page_id', [ $this, 'dokan_set_current_page_id' ] ); add_filter( 'dokan_get_translated_page_id', [ $this, 'dokan_get_translated_page_id' ] ); - add_filter( 'dokan_get_dashboard_nav', [ $this, 'replace_dokan_dashboard_nav_key' ] ); add_action( 'wp_head', [ $this, 'dokan_wpml_remove_fix_fallback_links' ] ); add_action( 'dokan_store_page_query_filter', [ $this, 'load_store_page_language_switcher_filter' ], 10, 2 ); add_filter( 'dokan_dashboard_nav_settings_key', [ $this, 'filter_dashboard_settings_key' ] ); + add_filter( 'dokan_dashboard_nav_menu_key', [ $this, 'filter_dashboard_settings_key' ] ); + add_filter( 'dokan_dashboard_nav_submenu_key', [ $this, 'filter_dashboard_settings_key' ] ); add_filter( 'wcml_vendor_addon_configuration', [ $this, 'add_vendor_capability' ] ); add_action( 'init', [ $this, 'fix_store_category_query_arg' ], 10 ); @@ -248,29 +257,6 @@ public function load_translated_url( $url, $name ) { return $url; } - /** - * Replace dashboard key language wise - * - * @param array $urls - * - * @since 2.4 - * - * @return array $urls - */ - public function replace_dokan_dashboard_nav_key( $urls ) { - $new_urls = $urls; - - foreach ( $urls as $get_key => $item ) { - $new_key = $this->translate_endpoint( $get_key ); - if ( $get_key !== $new_key ) { - $new_urls[ $new_key ] = $new_urls[ $get_key ]; - unset( $new_urls[ $get_key ] ); - } - } - - return $new_urls; - } - /** * @param string $endpoint * @@ -733,6 +719,20 @@ public function change_product_status( $product, $status ) { $translated_product->save(); } } + + /** + * Add High Performance Order Storage Support + * + * @since 1.0.10 + * + * @return void + */ + public function declare_woocommerce_feature_compatibility() { + if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { + \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); + \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', __FILE__, true ); + } + } } // Dokan_WPML function dokan_load_wpml() { // phpcs:ignore diff --git a/languages/dokan-wpml.pot b/languages/dokan-wpml.pot index ad8e8b1..7481212 100644 --- a/languages/dokan-wpml.pot +++ b/languages/dokan-wpml.pot @@ -1,26 +1,26 @@ -# Copyright (C) 2023 weDevs +# Copyright (C) 2024 weDevs # This file is distributed under the GPL2. msgid "" msgstr "" -"Project-Id-Version: Dokan - WPML Integration 1.0.9\n" +"Project-Id-Version: Dokan - WPML Integration 1.0.10\n" "Report-Msgid-Bugs-To: http://wedevs.com/support/\n" -"POT-Creation-Date: 2023-12-12 05:23:23+00:00\n" +"POT-Creation-Date: 2024-01-23 07:55:53+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2023-MO-DA HO:MI+ZONE\n" +"PO-Revision-Date: 2024-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "X-Generator: grunt-wp-i18n 1.0.3\n" -#: dokan-wpml.php:179 +#: dokan-wpml.php:188 #. translators: %1$s: opening anchor tag, %2$s: closing anchor tag msgid "" "Dokan - WPML Integration requires %1$s Dokan plugin %2$s to be " "installed & activated!" msgstr "" -#: dokan-wpml.php:185 +#: dokan-wpml.php:194 #. translators: %1$s: opening anchor tag, %2$s: closing anchor tag msgid "" "Dokan - WPML Integration requires %1$s WPML Multilingual CMS %2$s to " diff --git a/package-lock.json b/package-lock.json index 2a08e63..c42caf4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dokan-wpml", - "version": "1.0.8", + "version": "1.0.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dokan-wpml", - "version": "1.0.8", + "version": "1.0.10", "license": "GPL", "devDependencies": { "grunt": "^1.6.1", diff --git a/package.json b/package.json index 57b6b4f..4bc484a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dokan-wpml", - "version": "1.0.9", + "version": "1.0.10", "description": "WPML compatibility for dokan plugin", "author": "weDevs", "license": "GPL", diff --git a/readme.txt b/readme.txt index 432dc1f..bc8a2e2 100644 --- a/readme.txt +++ b/readme.txt @@ -2,12 +2,12 @@ Contributors: wedevs Tags: WPML, i18n, l10n, Translation, Dokan Donate link: https://tareq.co/donate -Requires at least: 5.4.0 +Requires at least: 5.6 Tested up to: 6.4.2 WC requires at least: 5.5.0 -WC tested up to: 8.2.2 -Requires PHP: 7.2 -Stable tag: 1.0.9 +WC tested up to: 8.5.1 +Requires PHP: 7.4 +Stable tag: 1.0.10 License: GPL v2 License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -52,6 +52,12 @@ nothing here == Changelog == +v1.0.10 -> Jan 23, 2024 +--------------------------- +- **fix:** Translation-Related Issues with Specific Menu Items in Vendor Dashboard with WPML +- **fix:** Woocommerce error notice when Dokan WPML Integration plugin is active +- **fix:** PHP warning creation of dynamic property + v1.0.9 -> Dec 12, 2023 --------------------------- - **new:** added a new filter named `dokan_get_translated_page_id` support added. With it, we will be able to get translated Page id from any Page ID.