Solve WPML issue
-
Hi,
I spent a few hours to solve a weird issue on WPML / Woocommerce site: when trying to display a translated page, (ie: https://example.com/en/example) the WP template used was an empty archive product page (using archive-product.php) template, not a page template with translated page content as expected.The reason is the code in
public/class-woowommerce-onsale-page-public.php
line 182 is outdated when using WPML.Line 182 should be updated from:
$id = icl_object_id($id,'page',false);
to:
$id = apply_filters( 'wpml_object_id', $id, 'page', TRUE );
Please check WPML documentation here, which explains that
icl_object_id()
function is outdated and has been removed since WPML 3.3wpgenie2, can you publish an update ?
- The topic ‘Solve WPML issue’ is closed to new replies.