• Resolved sorro445

    (@sorro445)


    Hi,
    I need to add accordions/showmore/showless to woocommerce cart and checkout tables. I have tried various plugins including yours, and I can succesfully display the shortcode values inside a product custom field. BUT: in the cart table, the “accordion” is open by default when loading the page, and it can’t be closed at all. Is there any way I can make it work inside these tables?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author George Gkouvousis

    (@gkouvousisg)

    I advise you to contact your theme’s developer, since it seems that there is a conflict here.

    My plugin is supposed to always show the link and hide the read-more included text, by default.

    Thread Starter sorro445

    (@sorro445)

    Hi,
    thanks, but it has nothing to do with the theme – the shortcode is workking fine o regular pages. But I am using it inside a product custom field, and displaying the value inside the woocommerce cart and checkot table, and there it’s not working.

    Plugin Author George Gkouvousis

    (@gkouvousisg)

    I cannot provide support for custom WC templates – and if this is the case here, we are talking about a customized WC template which belongs to the theme.

    Can you try my plugin onto a fresh WP installation that includes WC please to verify the same?

    Thread Starter sorro445

    (@sorro445)

    No, nothing is “customized”. It’s a basic WP installment with woocommerce, and woocommerce offers by default custom fields for each product. I am using

    add_filter( 'woocommerce_cart_item_name', 'customizing_cart_item_name', 10, 3 );
    function customizing_cart_item_name( $product_name, $cart_item, $cart_item_key ) {
        $product = $cart_item['data']; // Get the WC_Product Object
    
        if ( $value = $product->get_meta('description') ) {
            $product_name .= '<small>'. do_shortcode( $value ) .'</small>';
        }
        return $product_name;

    to display your shortcode in the cart and checkout table. But as I mentioned, the “Read more” is open by default and can’t be used inside the tables.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Problem with woocommerce tables’ is closed to new replies.