WordPress.org

Forums

WooCommerce Custom Product Tabs Lite
[resolved] Dynamic tab for in stock and out of stock products (2 posts)

  1. magicsun
    Member
    Posted 3 years ago #

    Hi,

    is it possible to have dynamic input in the fields (title and content) for in stock and out of stock products?

    if(empty($tab_data)) {
    			$tab_data[] = array('title' => 'Meer informatie', 'content' => '[gravityform id=1 name=Informatie / Nabestellen]');
    		}

    This is what I use to pre-fill information in the boxes, but this will be shown on each product.

    What I would like is to have a different title and content for out of stock products. So same tab, only different input.

    Can this somehow be done using php?

    In stock products should have:
    Title: More information
    Content: {gravityform id=1 name=order}

    Out of stock products should show:
    Title: Reorder
    Content: {gravityform id=2 name=Reorder}

    Thanks !

    http://wordpress.org/extend/plugins/woocommerce-custom-product-tabs-lite/

  2. FoxRunSoftware
    Member
    Posted 2 years ago #

    Hey, thanks for using my plugin and for the question. Sorry for not getting back to you for so long, I figured I'd be automatically emailed any support issues, which doesn't seem to be the case so I didn't know this was here.

    The short answer is no, it's not possible. That's a pretty interesting idea though, to have different content based on the stock level of the product. Still if I were to implement it, it would probably have to be for the paid Tab Manager plugin I released on the WooThemes store as it's a pretty tricky request. I have added the request to my internal request tracker, so with any luck I'll find the time and figure out a way to do it for the paid version at some point. Thanks again

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce Custom Product Tabs Lite
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.