WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce New Product Badge
[resolved] Can we use a category instead of x days? (4 posts)

  1. Mimi8
    Member
    Posted 1 year ago #

    Hello,

    I been looking for this kinda plugin for my woocommerce website, the only issue that I am having is that I need to actually select the product that is new, the x amount of days (recent) does not work for me since we add products all the time but are not new, or if we update an older product then the plugin marks it as a new item. Does that make sense?

    I have created a "New Style" category for my store, I was wondering if there is any way I can have the plugin display the "new" icon as I select the category "New Style"

    Hope I explained clearly.

    Any help will be appreciated.

    Mimi

    http://wordpress.org/extend/plugins/woocommerce-new-product-badge/

  2. jameskoster
    Member
    Plugin Author

    Posted 1 year ago #

    Hey,

    I replied to your comment on my site, guess you didn't see that though.

    All I can really suggest (as far as this plugin goes) is to adjust the published date of your products to determine newness when adding a product that is not "new".

    So if you want to add a product but it not have the new badge then set the published date outside of your newness range.

    Same applies if you update a product and want it to then have the new badge. Just update the published date to the current date.

    Hope that makes sense...

  3. Mimi8
    Member
    Posted 1 year ago #

    Hello!

    Yes I just replied to your comment on your site! Thank you very much for the help and prompt response! You are awesome :D

    Mimi

  4. isaakgeo
    Member
    Posted 11 months ago #

    Hello,

    I need to achieve the same thing (display the badge if product belongs to a certain category) and changing the published day doesn't work for me.

    I'm trying to replace
    if ( ( time() - ( 60 * 60 * 24 * $newness ) ) < $postdatestamp )
    with
    if ( is_category('category name') )

    but it doesn't work. Can you please help?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic