Home Forums WoodMart support forum How to Add such option. If possible, from theme settings or else, some other way Reply To: How to Add such option. If possible, from theme settings or else, some other way

#341800

Luke Nielsen
Keymaster

Hello,

9. I have edited the custom code above, now it must show an icon for the “My Account” link too.

https://gyazo.com/e69f065bc47f94714ac8b629ec07d386

10. Please, check this custom code.

if ( ! function_exists('wd_display_product_attributes') ) {
    function wd_display_product_attributes( $product_attributes, $product ) {

        if ( $product->is_type('simple' ) ) {
            global $post;
            $get_mpn = get_post_meta($post->ID, '_mpn', true);

            $product_attributes[ 'mpn-field mpn-field-single' ] = array(
                'label' => __('MPN', 'woocommerce'),
                'value' => $get_mpn,
            );
        }

        return $product_attributes;
    }

    add_filter('woocommerce_display_product_attributes', 'wd_display_product_attributes', 10, 2);
}

10c. So far we don’t have such plans.

Kind Regards

  • This reply was modified 2 years, 11 months ago by Luke Nielsen.