Support » Plugin: WooCommerce » Simple product not purchasable

  • Resolved RobinWebber


    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!

  • The topic ‘Simple product not purchasable’ is closed to new replies.