WPML
สถานะ
แก้ไขแล้วโดยผู้พัฒนา
ปลั๊กอิน/ธีมที่เกี่ยวข้อง
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
            ]
        );

ปัญหาที่ทราบแล้วทั้งหมด →