Skip to content

Commit

Permalink
Delete cache when update settings, PFW-27
Browse files Browse the repository at this point in the history
  • Loading branch information
kcppdevelopers committed Jan 29, 2021
1 parent afd59c1 commit 9f48697
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ temp/
.idea

/vendor/
/paypal-seller-onboarding
8 changes: 8 additions & 0 deletions ppcp-gateway/class-wc-gateway-ppcp-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ public function angelleye_defind_hooks() {
add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));
add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
}

public function process_admin_options() {
delete_transient('angelleye_ppcp_sandbox_access_token');
delete_transient('angelleye_ppcp_live_access_token');
delete_transient('angelleye_ppcp_sandbox_client_token');
delete_transient('angelleye_ppcp_live_client_token');
parent::process_admin_options();
}

public function init_form_fields() {
try {
Expand Down

0 comments on commit 9f48697

Please sign in to comment.