modify this function and enjoy null
public function _ajax_activate_license() {
$license_key = trim( sanitize_key( $_POST['license_key'] ) );
add_option('envato_purchase_code_42570063', $license_key, '', 'yes');
if ( 'yes' == get_option('ninetheme_deactivated_licence') ) {
delete_option( 'ninetheme_deactivated_licence' );
$href = esc_url( admin_url('admin.php?page=ninetheme_about_page') );
$btn = esc_html__( 'Return to the Dashboard', 'goldsmith' );
$title = esc_html__( 'Activated', 'goldsmith' );
$wait = esc_html__( 'The activation is done!', 'goldsmith' );
wp_send_json(array('success' => true,'complete' => true, 'href' => $href,'wait' => $wait,'title' => $title,'message' => esc_html__($output->msg, 'goldsmith' )));
}
}
protected function edd_activate_license( $license ) {
$success = false;
// Strings passed in from the config file.
$strings = $this->strings;
// Theme Name.
$theme = ucfirst( $this->theme );
// Remove "Child" from the current theme name, if it's installed.
$theme = str_replace( ' Child', '', $theme );
// Text strings.
$success_message = $strings['license-json-success%s'];
// Data to send in our API request.
$api_params = array(
'edd_action' => 'activate_license',
'license' => rawurlencode( $license ),
'item_name' => rawurlencode( $this->edd_item_name ),
'url' => esc_url( home_url( '/' ) ),
);
$response = array(
'success' => true,
'license' => 'valid'
);
// Make sure the response came back okay.
$message = sprintf( esc_html( $success_message ), $theme );
$success = true;
// Removes the default EDD hook for this option, which breaks the AJAX call.
remove_all_actions( 'update_option_' . $this->edd_theme_slug . '_license_key', 10 );
update_option( $this->edd_theme_slug . '_license_key_status', 'valid' );
update_option( $this->edd_theme_slug . '_license_key', $license );
return compact( 'success', 'message' );
}
public function _ajax_activate_license() {
$license_key = trim( sanitize_key( $_POST['license_key'] ) );
add_option('envato_purchase_code_42570063', $license_key, '', 'yes');
if ( 'yes' == get_option('ninetheme_deactivated_licence') ) {
delete_option( 'ninetheme_deactivated_licence' );
$href = esc_url( admin_url('admin.php?page=ninetheme_about_page') );
$btn = esc_html__( 'Return to the Dashboard', 'goldsmith' );
$title = esc_html__( 'Activated', 'goldsmith' );
$wait = esc_html__( 'The activation is done!', 'goldsmith' );
wp_send_json(array('success' => true,'complete' => true, 'href' => $href,'wait' => $wait,'title' => $title,'message' => esc_html__($output->msg, 'goldsmith' )));
}
}
protected function edd_activate_license( $license ) {
$success = false;
// Strings passed in from the config file.
$strings = $this->strings;
// Theme Name.
$theme = ucfirst( $this->theme );
// Remove "Child" from the current theme name, if it's installed.
$theme = str_replace( ' Child', '', $theme );
// Text strings.
$success_message = $strings['license-json-success%s'];
// Data to send in our API request.
$api_params = array(
'edd_action' => 'activate_license',
'license' => rawurlencode( $license ),
'item_name' => rawurlencode( $this->edd_item_name ),
'url' => esc_url( home_url( '/' ) ),
);
$response = array(
'success' => true,
'license' => 'valid'
);
// Make sure the response came back okay.
$message = sprintf( esc_html( $success_message ), $theme );
$success = true;
// Removes the default EDD hook for this option, which breaks the AJAX call.
remove_all_actions( 'update_option_' . $this->edd_theme_slug . '_license_key', 10 );
update_option( $this->edd_theme_slug . '_license_key_status', 'valid' );
update_option( $this->edd_theme_slug . '_license_key', $license );
return compact( 'success', 'message' );
}