Support » Plugin: WooCommerce » Webhook Product Title with attributes

  • Resolved polisafety

    (@polisafety)


    I know all variations are shown as “Product title – variation name” (ex. Blue TShirt – XL). I wanted to know if there is a way to show two or more attribute names on its title (ex. Product Title – Color – Size = Modern TShirt – Blue – XL).

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Grigorij S. a11n

    (@grigaswp)

    Hi there,

    Thanks for reaching out!

    I know all variations are shown as “Product title – variation name” (ex. Blue TShirt – XL). I wanted to know if there is a way to show two or more attribute names on its title (ex. Product Title – Color – Size = Modern TShirt – Blue – XL).

    Where is it that you’re seeing a product name that consists of Product title and Variation name? Perhaps you have a link to an example?

    Thank you!

    Thread Starter polisafety

    (@polisafety)

    Thank you for your support!

    I apologize for not stating my question clearly.
    If you send a variation ‘product update’ via webhook you will see that the product title consists of “Product Title – Variation Name” (ex. Newage TShirt – Blue).

    This means that the variation make is comprised of the original product title (Newage TShirt) along with the corresponding attribute name (Blue). But if we add more attributes we instead get only the product title instead of both “product title – attribute name – attribute name” (ex. Newage TShirt – Blue – XL)

    If hope this makes my question more clear.

    Plugin Support Grigorij S. a11n

    (@grigaswp)

    Hi there,

    Thank you for the clarification!

    It’s this part of the code that is responsible for this behaviour: https://github.com/woocommerce/woocommerce/blob/master/includes/data-stores/class-wc-product-variation-data-store-cpt.php#L263-L272

    This code can be used in functions.phpin order to to resolve: add_filter('woocommerce_product_variation_title_include_attributes', '__return_false' ); and add_filter( 'woocommerce_is_attribute_in_product_name', '__return_false' );

    You’d still need to re-save those variable products to re-sync with the database.

    I hope this helps!

    Thread Starter polisafety

    (@polisafety)

    Indeed it does! Thank you very much for your time and support!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Webhook Product Title with attributes’ is closed to new replies.