تخطي الملاحة

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>