• Resolved stoelwinder

    (@stoelwinder)


    I’ve always used this plugin as a way to display a “On Back-Order” badges instead of “Out of Stock” badge. Up until version 3.2.2 I managed to do this by just reviewing the source code and changing all mentions of ! $product->is_in_stock to $product->is_on_backorder (note the removal of !).

    This worked great, until the more recent versions. I notice that now when I change the above product tags, the badges no longer showing up.

    Am I missing something? I tried looking at the source code but have not been able to find the source of the issue.

    Besides trying to find a way to fix my scenario, perhaps a great way of expanding the use case for this plugin, you can consider having a permanent setting flag that allows the same plugin to be used for products that are on back-order?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Charlie Etienne

    (@charlieetienne)

    Hi @stoelwinder, indeed, since this is the second time I’m being asked for this feature, I will consider adding this as a setting. I’m starting digging into this right now but I don’t know when it will be available. Maybe tonight or maybe later.

    Stay tuned!

    Thanks,

    Charlie

    Thread Starter stoelwinder

    (@stoelwinder)

    Dear Charlie,

    Thanks for your prompt response. Getting it to work was pretty easy before. I have 3.2.2 working by simply replacing all instances of ! $product->is_in_stock to $product_is_on_backorder, so hopefully its an easy implementation!

    Plugin Author Charlie Etienne

    (@charlieetienne)

    @stoelwinder, I just pushed a new version (4.3.0) with this feature. Let me know if it works fine for you.

    As the plugin is growing the amount of code to write/change is growing as well. Just for this feature we have 68 new lines of code!

    You can see the diff here if you are interested.
    https://github.com/CharlieEtienne/sold-out-badge-for-woocommerce/commit/18c8ced7b19a7bb8b8fa8f52e61fea23d6090604

    Cheers,

    Charlie

    Plugin Author Charlie Etienne

    (@charlieetienne)

    Maybe @kcjson15 would be interested to know that we’re now able to display badge on backorder products

    Thread Starter stoelwinder

    (@stoelwinder)

    Dear Charlie,

    Working excellent! Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘is_on_backorder instead of is_in_stock’ is closed to new replies.