- الحالة
- محلولة بواسطة المطور
- الإضافة/القالب ذو الصلة
- Woocommerce Product Tabs
- وسوم الموضوع
- Compatibility, WCML
نظرة عامة على المشكلة
إذا كنت تستخدم WooCoommerce Product Tabs، فقد تواجه مشكلة حيث تظهر علامة تبويب المنتج في جميع اللغات، بدلاً من عرض علامة تبويب المنتج الخاصة باللغة الحالية فقط.
حل بديل مؤقت
يرجى التأكد من أخذ نسخة احتياطية كاملة لموقعك قبل المتابعة.
- افتح …/wp-content/plugins/woocommerce-product-tabs/src/Product_Tabs.php
- في السطر 34، ابحث عن الدالة custom_woocommerce_product_tabs($tabs)
- غيّر الجزء الأول من الدالة من:
public function custom_woocommerce_product_tabs( $tabs ) { global $product; $this->product_tabs_list = get_posts( [ 'post_type' => 'woo_product_tab', 'posts_per_page' => -1, 'orderby' => 'menu_order', 'order' => 'asc', ] ); - إلى:
public function custom_woocommerce_product_tabs( $tabs ) { global $product; $this->product_tabs_list = get_posts( [ 'post_type' => 'woo_product_tab', 'posts_per_page' => -1, 'orderby' => 'menu_order', 'order' => 'asc', 'suppress_filters' => 0, // WPML workaround compsupp-7688 ] );