woocommerce_process_shop_coupon_meta

This is the filter that is responsible for saving your field data for the coupon.

[php]
function webdav_newcoupon_save_data( $post_id ) {
$newcoupon_fields = array (
// Your fields should be listed here as an array of
// strings.
);
foreach ($newcoupon_fields as $field) {
$value = isset($_POST[ $field ]) ? $_POST[ $field ] : ”;
update_post_meta($post_id, $field, $value);
}
}
add_filter( ‘woocommerce_process_shop_coupon_meta’, ‘webdav_newcoupon_save_data’, 10, 1 );
[/php]


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.