• Resolved PaineFreeCrafts

    (@painefreecrafts)


    hi folks

    I am moving to OceanWP from Canvas as they aren’t supporting Canvas any more, and I’m impressed so far with OceanWP.. However..

    I have a site where members get discounted prices (20% off most but not all categories) which I manage through user roles & pricing deals. I was able to stop the “sales flash” showing (as it shows on most products and isn’t needed!) on Canvas by using a custom function. However it doesn’t work on OceanWP.

    As I will (occasionally) run sales that *aren’t* related to the club member prices, I’d like the ability to hide the sales flash most of the time and only activate it when I am running an actual sale. (or hide it all the time is my preferred alternative!).

    Any ideas?

Viewing 15 replies - 1 through 15 (of 16 total)
  • Hello PaineFreeCrafts,

    Please share the site url so i can look into the website issue.

    Kind Regards,

    Manoj

    Thread Starter PaineFreeCrafts

    (@painefreecrafts)

    Hi Manoj

    I haven’t activated the theme because of this issue (I’m still using Canvas), so the site url won’t help at this point. I’d also need to set you up as a member so you can see the issue.

    I’ve done a workaround in that the discount can be applied on checkout rather than through the catalogue, but I’d rather like members to see their special pricing on the front pages of the site rather than just in checkout.

    I’m just setting up a new staging site so will post the URL of that so you can see what I mean.

    Thread Starter PaineFreeCrafts

    (@painefreecrafts)

    (staging is going to take a little while – I’m just starting to use WPTime Capsule and it’s doing the first backup so will be a few hours yet I suspect)

    Theme Author oceanwp

    (@oceanwp)

    Hello, what is the function who doesn’t work?

    Thread Starter PaineFreeCrafts

    (@painefreecrafts)

    //Remove Sales Flash
    add_filter(‘woocommerce_sale_flash’, ‘woo_custom_hide_sales_flash’);
    function woo_custom_hide_sales_flash()
    {
    return false;
    }

    Theme Author oceanwp

    (@oceanwp)

    Hello, I use this code in the functions.php file of my child theme:

    // Remove Sales Flash
    function woo_custom_hide_sales_flash() {
    	return false;
    }
    add_filter( 'woocommerce_sale_flash', 'woo_custom_hide_sales_flash' );

    It works perfectly, the sale badges are hidden.

    Thread Starter PaineFreeCrafts

    (@painefreecrafts)

    it works great in my Canvas theme, but not in OceanWP (not the preview anyway). No other changes.

    I’m using the “My Custom Functions” plugin.

    I can try it with a child theme of OceanWP too – not set one up yet because I didn’t activate the theme yet. Certainly doesn’t work in preview mode.

    Theme Author oceanwp

    (@oceanwp)

    Try with a child theme because it works for me so it should work for you, I use the same theme ??

    Thread Starter PaineFreeCrafts

    (@painefreecrafts)

    interesting. works through a child theme but not the function plugin.

    Although the child theme doesn’t appear to be getting the settings from the main oceanWP setup as they look massively different on preview (despite the child theme not having many of its own settings at all)

    Theme Author oceanwp

    (@oceanwp)

    I advise you to use a child theme for things like that.

    To have your parent theme settings in your child theme, activate the parent theme, go to Theme Panel > Import/Export, click the Export Settings button, activate your child theme, go back to the Import/Export page and import your json file.
    As WordPress seen a child theme as a new theme, your settings are reset.

    Thread Starter PaineFreeCrafts

    (@painefreecrafts)

    Will be playing once the staging site is complete. I do love the flexibility of OceanWP so will be back — many thanks.

    Theme Author oceanwp

    (@oceanwp)

    You’re welcome ??

    Thread Starter PaineFreeCrafts

    (@painefreecrafts)

    have decided it’s neater to have the discount in the cart in case I do run other sales ??

    But so happy to have that shortcode that worked – again thanks.

    Theme Author oceanwp

    (@oceanwp)

    You are most welcome ??

    Thread Starter PaineFreeCrafts

    (@painefreecrafts)

    (not relevant to sales flash – different question) – moving to own topic

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘remove sales flash’ is closed to new replies.