Skip to content

Commit

Permalink
Merge branch 'release/1.0.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
Aunshon committed Jan 29, 2024
2 parents 16ae34f + 4f3caea commit 19d533f
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 41 deletions.
3 changes: 2 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ module.exports = function(grunt) {
'!tests/**',
'!**/Gruntfile.js',
'!**/package.json',
'!**/package-lock.json',
'!**/README.md',
'!**/*~'
],
Expand Down Expand Up @@ -84,4 +85,4 @@ module.exports = function(grunt) {
'copy',
'compress'
])
};
};
6 changes: 6 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
54 changes: 27 additions & 27 deletions dokan-wpml.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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' ] );
Expand All @@ -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 );
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions languages/dokan-wpml.pot
Original file line number Diff line number Diff line change
@@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\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 ""
"<b>Dokan - WPML Integration</b> 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 ""
"<b>Dokan - WPML Integration</b> requires %1$s WPML Multilingual CMS %2$s to "
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
14 changes: 10 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 19d533f

Please sign in to comment.