You appear to be a bot. Output may be restricted
Description
Check if license key is valid once per week
Usage
EDD_License::weekly_license_check();
Parameters
Returns
void void
Source
File name: easy-digital-downloads/includes/class-edd-license-handler.php
Lines:
1 to 44 of 44
public function weekly_license_check() { if ( ! empty( $_POST['edd_settings'] ) ) { return; // Don't fire when saving settings } if ( empty( $this->license ) ) { return; } // data to send in our API request $api_params = array( 'edd_action'=> 'check_license', 'license' => $this->license, 'item_name' => urlencode( $this->item_name ), 'url' => home_url() ); if ( ! empty( $this->item_id ) ) { $api_params['item_id'] = $this->item_id; } // Call the API $response = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) ); // make sure the response came back okay if ( is_wp_error( $response ) ) { return false; } $license_data = json_decode( wp_remote_retrieve_body( $response ) ); $this->maybe_set_pass_flag( $this->license, $license_data ); update_option( $this->item_shortname . '_license_active', $license_data ); }