Skip to content

Commit

Permalink
Merge pull request #4 from saimonh3/fix/wmpl
Browse files Browse the repository at this point in the history
fix: color customizer and order page is not loading is fixed
  • Loading branch information
sabbir1991 authored Nov 4, 2019
2 parents f3e879a + 140fdbe commit 2b46d6a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions dokan-wpml.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public function __construct() {
// Load all filters hook
add_filter( 'dokan_get_navigation_url', array( $this, 'load_translated_url' ), 10 ,2 );
add_filter( 'body_class', array( $this, 'add_dashboard_template_class_if_wpml' ), 99 );
add_filter( 'dokan_get_current_page_id', [ $this, 'dokan_set_current_page_id' ] );
}

/**
Expand Down Expand Up @@ -293,6 +294,19 @@ public function load_scripts_and_style() {
return false;
}

/**
* Dokan set current page id
*
* @since 1.0.2
*
* @param int page_id
*
* @return int
*/
public function dokan_set_current_page_id( $page_id ) {
return wpml_object_id_filter( $page_id, 'page', true, wpml_get_default_language() );
}

} // Dokan_WPML

function dokan_load_wpml() {
Expand Down

0 comments on commit 2b46d6a

Please sign in to comment.