[resolved] Simple product not purchasable (1 post)

  1. RobinWebber
    Posted 2 years ago #

    Hi there,

    I'm trying to setup my Woocommerce shop within a custom theme. I have some variable products, but most products are 'simple products'. I've got a strange problem...

    When I'm logged in, everything is working as suspected. I see the prices and add to cart button on the single product pages of simple products and variable products.

    But, when I'm not logged in, the add to cart button of simple products isn't showing up, while on variable products it is working! I've figured out it 'returns' on this line inside simple.php

    if ( ! $product->is_purchasable() ) return;

    When I hide this line of code, it does show the add to cart button of the simple products.

    Does anyone have a clue why the simple products add to cart button isn't showing when not logged in, because of the product not being purchasable?

    Thank you in advance!


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic