'How to update coupon meta data in Woocommerce (Wordpress) automatically after the coupon is created
I'm looking to update the metadata of any new coupons automatically after they are created. While searching for an answer I've came across ways to update meta data for posts in general, but none have worked the way I thought they would.
A plugin I'm using created a new meta data option for coupons that I need to set to active by default. I have the update meta data snippet, but I'm not exactly what hook to insert it into.
This is the snippet:
update_post_meta($coupon_id, 'autoship_exclude_autoship', true);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
