Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Extension_License::weekly_license_check()
Check if license key is valid once per week
Description Description
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Return Return
(void)
Source Source
File: classes/Extension/License.php
public function weekly_license_check() { if ( ! empty( $_POST['popmake_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(), ); // 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; } $license_data = json_decode( wp_remote_retrieve_body( $response ) ); update_option( $this->item_shortname . '_license_active', $license_data ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.5 | Introduced. |