Skip navigation

Waiting for author

Topic Tags: Compatibility

Overview of the issue

When using the WoodMart theme with WPML, single product layouts based on product types are not working as expected. Instead, your products will fall back to the default layout.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open the …/wp-content/themes/woodmart/inc/modules/layouts/class-single-product.php file.
  • Look for line 20.
  • Replace:
    			$condition['condition_query'] = apply_filters( 'wpml_object_id', $condition['condition_query'], $condition['condition_type'] );
            
  • With:
    		if ( $condition['condition_type'] !== 'product_type' ) {
    			$condition['condition_query'] = apply_filters( 'wpml_object_id', $condition['condition_query'], $condition['condition_type'] );
    		}
            

Оставить ответ

Пожалуйста, оставайтесь в теме и будьте уважительны к другим. Если Вам нужна помощь по вопросам, не относящимся к этому сообщению, воспользуйтесь нашим Форумом поддержки, чтобы начать чат или отправить тикет.

Вы можете использовать эти теги:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>