Skip to content

Commit

Permalink
improve pro updater
Browse files Browse the repository at this point in the history
  • Loading branch information
kilbot committed Mar 14, 2024
1 parent 49a47c8 commit 72963f6
Show file tree
Hide file tree
Showing 4 changed files with 379 additions and 252 deletions.
11 changes: 11 additions & 0 deletions includes/API/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ class Settings extends WP_REST_Controller {
*/
public function __construct() {
add_filter( 'option_woocommerce_pos_settings_payment_gateways', array( $this, 'payment_gateways_settings' ) );

// remove this once Pro settings have been moved to the new settings service.
add_filter( 'pre_update_option_woocommerce_pos_pro_settings_license', array( $this, 'remove_license_transient' ) );
}

/**
Expand Down Expand Up @@ -543,4 +546,12 @@ public function payment_gateways_settings( $options ) {

return $options;
}

/**
* Temporary fix for stale license status transient. Remove when possible.
*/
public function remove_license_transient( $value ) {
delete_transient( 'woocommerce_pos_pro_license_status' );
return $value;
}
}
Loading

0 comments on commit 72963f6

Please sign in to comment.