Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #2748606
Hide composite name in selectors
Closed

Comments

  • Zappo started the conversation

    Hello,

    it would be great, if there were an option to hide the composite's name in the selector as in the cart (FAQ Question 10: How to hide the composite’s name in cart and checkout?). Your plugin WPC Variations Radio Buttons does this already include: Variation name -> Formatted without attribute name.

    This would be a great option!

    Otherwise: is it possible with CSS?

    Thanks for reading, kind regards,

    Zappo

  •  1,226
    Dustin replied

    Hi Zappo,

    Please add the below custom code (How to add custom code?)

    add_filter( 'wooco_product_name', 'wooco_custom_product_name', 99, 4 );
    function wooco_custom_product_name( $name, $_product, $qty, $price ) {
        if ( $_product->is_type( 'variation' ) ) {
            return wc_get_formatted_variation( $_product, true, false, false ) . ' (' . wc_price( $price ) . ')';
        }
        return $name;
    }

    And the result https://www.screencast.com/t/Ee16iTRqbAb

    Best regards,
    Dustin

  • Zappo replied

    Hello Dustin,


    many thanks for this snippet, it works as described, I just had to delete the price part, as this is now independent from the options... but I can live with that.

    EDIT: maybe there will be in future an option like in WPC Variations Radio Buttons. ;-)

    Kind regards,
    Zappo

  • [deleted] replied

    Hi Zappo,

    Thanks for your feedback. I'm glad that it was solved / you have been able to figure it out. We will notice this and maybe update them in the future. Thank you very much.

    I'll consider your case closed and close your ticket now. Feel free to submit a new one in case you encounter any issues at any time. 

    Have a nice day and best regards. 

  • Zappo replied

    Hello,

    like in the other thread (https://wpc.ticksy.com/ticket/2750304): what would be the customization fee to include this option here into the public version of this plugin? I think, other users would like this, too.

    Kind regards,
    Zappo

  • [deleted] replied

    Hi Zappo,

    As Triston replied, we do not currently accept paid custom jobs. I also thank you very much, maybe this is a feature that will be updated in the future.

    Regards,

  •  1,226
    Dustin replied

    Hi Zappo,

    We already had this feature in WPC Variations Radio Buttons https://www.screencast.com/t/HEQIUuxEf

    Please choose this option and the result https://www.screencast.com/t/ZPvgbXguG

    In the composite, products will be listed - not only the variations. That is why we'll show the full product name.

    Best regards,
    Dustin

  • Zappo replied

    Dear Dustin,

    many thanks for your reply, but this is not, what I was asking for, please see my screenshots and replies earlier.

    Best regards,
    Zappo

  •  1,226
    Dustin replied

    Currently, we aren't available for the customization works. Sorry about that!

    Best regards,
    Dustin