display_add_to_cart $item not an array
-
I’m trying just to remove the name from the add to cart form. Just don’t want the title of the page shown twice.
Saw the templates, made one added the function to remove and use a custom version of the display_add_to_cart function.
Passing $item to display_add_to_cart then simply inside of that saying print_r($item) shows the form as normal. I would expect at that point to get an array back. When I copied all the code from the original function as a base it keeps saying array_key_exists() expects parameter 2 to be array.
remove_filter('scabn_display_add_to_cart',array($this,'display_add_to_cart'),10); add_filter('scabn_display_add_to_cart','display_add_to_cart',10,1); function display_add_to_cart($item) { print_r($item); }
Other than that this plugin is perfect.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘display_add_to_cart $item not an array’ is closed to new replies.