Created
May 18, 2021 06:51
-
-
Save ahmedeshaan/5e7c6e4271c7c6bd2fa31733e47f3ece to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wd_tiny_cart_wpml_page_id($page_id) { | |
global $sitepress; | |
if ($sitepress && has_filter('wpml_object_id')) { | |
$pageId = apply_filters('wpml_object_id', $page_id, 'page', true, $sitepress->get_current_language()); | |
} | |
return $pageId; | |
} | |
add_filter('woocommerce_get_cart_page_id', 'wd_tiny_cart_wpml_page_id'); | |
add_filter('woocommerce_get_checkout_page_id', 'wd_tiny_cart_wpml_page_id'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment