I just noticed some issues after using WooCommerce + qTranslate + qTranslate-slug + qTML: Breadcrumbs on WooCommerce product pages were completely off, also, some (theme-specific) individual page/post related settings were not applied as they should.
Disabling qTranslate-slug proved to solve those, so after scouring the code for a while I discovered the exact reason: global $post variable is replaced every time _get_page_link() is called, line 1293 @qtranslate-slug.php.
I just created a temp variable where I stored the “old” one at the start of the function, only to restore it again before returning. May not be an ideal solution, but hey, now it works as a charm.
- The topic ‘Global $post variable being replaced by _get_page_link()’ is closed to new replies.