• Hello, I have a description for each attribute i want to display it in the widget form output.
    Its possible to override yit-wcan-widget-tag-list form output in my Child theme?
    so i can put a code in my function.php instead to manual modification the plugin code each time.

    Thank you

    • This topic was modified 3 years, 11 months ago by tayssir.ch.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter tayssir.ch

    (@tayssirch)

    I want to retrieve the default attribute image dynamically,

    so my custom modifications is:

    $thumbnail_id = get_woocommerce_term_meta( $term->term_id, 'product_attribute_image', true );
    $textureImg = wp_get_attachment_image_src( $thumbnail_id );
    $term_image = apply_filters( 'yith_wcan_term_name_to_show', $term->description, $term );
    
    printf( '<li %s><a %s href="%s"><img class="attributeimage" src="%s">%s</a>', $class, $rel_nofollow, esc_url( $link ), esc_url( $textureImg[0]), wp_kses_post( $term_name  ) ); // phpcs:ignore

    can you give me a code that i can put it in my function.php to override the default output ?

    Appreciated

    Plugin Support Andrea Grillo

    (@agengineering)

    Hi there,

    could you tell to me where you find this yit-wcan-widget-tag-list, please ?
    Let me know

    Thread Starter tayssir.ch

    (@tayssirch)

    Hello Andrea,
    I made changes here : includes/widgets/class.yith-wcan-navigation-widget.php

    instead of

    printf( '<li %s><a %s href="%s">%s</a>', $class, $rel_nofollow, esc_url( $link ), wp_kses_post( $term_name ) );

    I want to replace it with:
    printf( '<li %s><a %s href="%s"><img class="attributeimage" src="%s">%s</a>', $class, $rel_nofollow, esc_url( $link ), esc_url( $textureImg[0]), wp_kses_post( $term_name ) );

    but the problem, instead of each time i update the plugin, i don’t want to replace them manually,
    that’s why i am asking if there is a function i can put it in function.php

    Plugin Support Andrea Grillo

    (@agengineering)

    Hi there,

    this is a class that show we use to create the widget and you can’t override it in child theme, I’m sorry.
    However, you’re using the classic widget but we have added a new kind of filters called PRESET. Our idea is to move all from classic widget to preset. For now the two system works fine but in future we’ll support only the preset and we’ll remove the classic widget.

    From the version 4.0 of YITH WooCommerce Ajax Product Filter plugin we add an automatic migration tools in order to convert the current filter into a preset. You can read this post in order to understand how to doing that.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Outputs the form its possible?’ is closed to new replies.