• George

    (@subscriptiongroup)


    Hi,

    Thanks for this useful plugin. It seems to work fine for our needs, however we noticed that the usage count is copied to the new coupon.

    This shouldn’t be the case, as the new coupon hasn’t really been used and that could cause issues with the coupon usage restrictions.

    I updated your plugin by changing line 179 to

    if ($post_meta_row->meta_key == "usage_count") {
        $sql_query_sel[] = $wpdb->prepare( "SELECT %d, %s, %s", $new_id, $post_meta_row->meta_key, 0 );
    } else {
        $sql_query_sel[] = $wpdb->prepare( "SELECT %d, %s, %s", $new_id, $post_meta_row->meta_key, $post_meta_row->meta_value );
    }

    But there might be a better solution to this.

    • This topic was modified 7 years, 12 months ago by George.
  • The topic ‘Usage count should not be copied’ is closed to new replies.