Last active
October 25, 2018 14:07
-
-
Save dennisnissle/bd28dbfd84c51ccda5a5484743485928 to your computer and use it in GitHub Desktop.
Hook into post creation for coupons and mark as voucher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'save_post_shop_coupon', 'my_child_after_coupon_save', 10, 3 ); | |
function my_child_after_coupon_save( $post_id, $post, $update ) { | |
update_post_meta( $post_id, 'is_voucher', 'yes' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment