WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Woocommerce] Sale Bage Showing on Every Product Page (6 posts)

  1. invot
    Member
    Posted 1 year ago #

    I was hoping someone can tell me why every product in my store suddenly claims to be on sale, regardless of weather or not the price is discounted. Where in the template files would this line of code be so I can test it? Anyone have the same problem? Anyone know what could cause this issue?

  2. invot
    Member
    Posted 1 year ago #

    So I discovered that the file is located at woocommerce/templates/single-product/sale-flash.php and everything there seems to be untouched and working fine... not sure if the function itself needs some adjusting. I'm off to figure that one out.

    <?php if ($product->is_on_sale()) : ?>
    
    	<?php echo apply_filters('woocommerce_sale_flash', '<span class="onsale">'.__('Sale!', 'woocommerce').'</span>', $post, $product); ?>
    
    <?php endif; ?>
  3. invot
    Member
    Posted 1 year ago #

    Well, there doesn't seem to be a conflict with any other plugins. The function itself it also untouched. *sigh*

    Anyone willing to shed some light on this situation?

  4. invot
    Member
    Posted 1 year ago #

    Alright, figured it out. I'm unsure what caused the problem, but the solution seemed to be to remove all the sales from my store. Re-inserting them later seemed to have resolved this bug. Yay?

  5. Stacy (non coder)
    Member
    Posted 10 months ago #

    This didn't work for me. Every product still says sale. BUG.

  6. WPyogi
    Volunteer Moderator
    Posted 10 months ago #

    @Stacy - posting in an old, already marked "resolved" thread is not a good way to get assistance on these forums. Please start a NEW thread if you want help.

Topic Closed

This topic has been closed to new replies.

About this Topic