filtering wpmenucart_menu_item_a_content
-
This is an impressive plugin, and I appreciate that you’ve put filters in there.
I’m trying to filter so that only the count shows, not the words ‘item’ or ‘items’. (I’m using a backround image behind it that says “Pending bookings” and the word isn’t helpful)Here’s what I’m trying:
/* Filter WP Menu Cart to show only number of items */ add_filter ( 'wpmenucart_menu_item_a_content', 'cc_menu_cart', 10, 4 ); function cc_menu_cart( $menu_item_a_content, $menu_item_icon, $cart_contents, $item_data ) { $menu_item_a_content = '<span class="cartcontents">'.$item_data['cart_contents_count'].'</span>'; return $menu_item_a_content; }When I refresh, I can see it as intended momentarily flashing, but when everything finishes loading the word ‘item’ is there. Is my filter code correct?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘filtering wpmenucart_menu_item_a_content’ is closed to new replies.