Skip to content

Commit

Permalink
Delete transients and options when change license key
Browse files Browse the repository at this point in the history
  • Loading branch information
G3ronim0 committed Jun 16, 2016
1 parent ca6a5af commit ef53c7f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions inc/admin/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ function wptxu_save_extra_profile_fields( $user_id ) {

} else {

$old = get_option( 'wptxu_sl_key' );

if ( $old && $old != $new ) {
delete_option( 'wptxu_license_status' );
delete_transient( '_wptxu_license_data' );
delete_transient( '_wptxu_license_error' );
}

update_usermeta( absint( $user_id ), 'wptxu_transifex_auth', base64_encode( $_POST['wptxu-tx-username'] . ':' . $_POST['wptxu-tx-password'] ) );
update_usermeta( absint( $user_id ), 'wptxu_transifex_user', $_POST['wptxu-tx-username'] );
update_option( 'wptxu_sl_key', $_POST['wptxu-sl-key'] );
Expand Down

0 comments on commit ef53c7f

Please sign in to comment.