• Hey Forum,

    Thank you for reading this. I have a problem that i’ve just encountered. I’m using wordpress to build my site. However atm there is an “error” or a message displayed at the bottom of my woocommerce products.

    It says:

    
    global $woocommerce; foreach($woocommerce->cart->get_cart() as $cart_item_key => $values ) { $_product = $values['data']; if( get_the_ID() == $_product->id ) { echo 'Quantity Is'. $values['quantity'];// quantity of the product } }

    It says it on every single product. What did i miss? Why is it displaying?

    Thank you for your help guys!

    Regards,

    Oliver ??

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I’m not sure why you marked this topic NSFW. I’ve un-done that.

    It looks like you edited some code — probably adding a ?> someplace that’s made the server regard PHP as just some HTML to display. What did you change lately?

    Thread Starter oliver7772

    (@oliver7772)

    Thank you for your reply. I did nothing. Like liternaly nothing. I’m not surr where to look for this code. Got any ideas?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Install the plugin “String Locator” and use it to search for the string $woocommerce->cart->get_cart() so we can see where that string is occurring, then look at those files.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress Woocommerce Error Displayed on Screen’ is closed to new replies.