Support » Plugin: WooCommerce » Discount price coming off after a Purchase.

  • Resolved Nastin Mfena

    (@nas9286)


    I am having this issue with my site.

    `When we sell a discount product then after the sale the discount price disappears.

    For example:
    The product price is $100
    The discount price is $80
    Customer buys products for $80
    After the sale, the product goes back to $100

    We are using the Auros WP Theme. How can we resolve this issue?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Nastin Mfena

    (@nas9286)

    After making a lot of troubleshooting, we were able to pin the problem to Auros Core Plugin but we don’t know how to figure out exactly what line of code could be causing this conflict, and changing the entire theme is too much work for us now.

    Can someone help? We are willing to pay.

    Plugin Support Thu P. a11n

    (@thup90)

    Hi there,

    I’m glad you found the culprit with the Auros Plugin.

    For assistance with customization or development with your site, I’d recommend reaching out to a developer on our customizations page.

    Thread Starter Nastin Mfena

    (@nas9286)

    Hi.

    Thanks for your response but I am looking for help and not to hire a developer. I know this problem is little just that errors are not displayed and I don’t want to mess up the core plugin.

    I am hoping to get a Auros Developer or someone who has had similar issue with similar plugin to help.

    Plugin Support Thu P. a11n

    (@thup90)

    Hi there,

    I am hoping to get a Auros Developer or someone who has had similar issue with similar plugin to help.

    In this case, I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.`

    Thread Starter Nastin Mfena

    (@nas9286)

    Thank you for the information. I hope to find someone on one of those platforms who can help.

    Plugin Support AW a11n

    (@slash1andy)

    Automattic Happiness Engineer

    I’m going to mark this as resolved on our end here, as this is not a WooCommerce issue.

    Have a great one!

    Thread Starter Nastin Mfena

    (@nas9286)

    I am posting the solution to the problem here in case someone stumbles across it in the future.

    I found this piece of code in the Auros Core Plugin on lines 240-244 of the class-woocommerce-extra.php that seems to be the issue:
    
    if ( $new_sales >= $deal_quantity ) {
                            $this->end_deal( $product_id );
                        } else {
                            update_post_meta( $product_id, '_deal_sales_counts', $new_sales );
                        }
    
    When I comment out this code, I was able to purchase a sale item and upon returning to the product page, the sale price continued to display. Scrolling up and inspecting the code further (starting at line 155), it looks like the plugin adds a Sale quantity field that allows you to determine how many products can be purchased before reverting to the Regular price.

    I entered 50 into the field, purchased the item several times, and the sale price remained in place.

    So it looks like you could either comment out the above code or set a Sale quantity to prevent the product from rolling back to the regular price after one sale product is purchased.

    I hope it helps someone some day.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Discount price coming off after a Purchase.’ is closed to new replies.