Show compare table attributes values and labels in WooCommerce product description page

I recently create a website with WordPress and inserted 700 products with their attributes.

Right now I just need to show these inserted attributes in product description tab. I installed a plugin called show attributes which shows only the attributes inserted in product edit page not those in quick edit!
Also I need to customize the Yith compare plugin php code and insert them into my theme’s woocommerce product page in order to show exact attributes I need.

Read More

Here is a function of Yith Compare product to show products attributes:

/**
     * The fields to show in the table
     *
     * @return mixed|void
     * @since 1.0.0
     */
    public function fields() {

        $fields = get_option( 'yith_woocompare_fields', array() );

        foreach ( $fields as $field => $show ) {
            if ( $show ) {
                if ( isset( $this->default_fields[$field] ) ) {
                    $fields[$field] = $this->default_fields[$field];
                }
                else {
                    if ( taxonomy_exists( $field ) ) {
                        $fields[$field] = get_taxonomy( $field )->label;
                    }
                }
            }
            else {
                unset( $fields[$field] );
            }
        }

        return $fields;
    }

Related posts