• Resolved leighjones123

    (@leighjones123)


    Hi guys,

    Is there any code that I could use to enable CMP automatically?

    I’m basically trying to get it to enable automatically when all products have been sold out in my WooCommerce store. I think I can work the WooCommerce bit out… but struggling to find the right code for CMP

    Can this be done?

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Ales

    (@alesmal)

    Hello, you can simply update_option to enable CMP mode like this:

    update_option('niteoCS_status', '1');

    Ales

Viewing 1 replies (of 1 total)

The topic ‘PHP code to enable CMP’ is closed to new replies.