Untitled
unknown
javascript
18 days ago
964 B
4
Indexable
Never
$.ajax({ type: 'POST', url: ajaxurl, data: { action: 'vamtam-check-license', 'license-key': $licenseInput.val(), nonce: self.attr('data-nonce'), unregister: isUnregister ? true : true, }, success: function(data) { if ( data.includes( 'Valid Purchase Key' ) ) { window.location = window.location.href; } else if ( data.includes( 'Incorrect Purchase Key' ) ) { if ( isUnregister ) { window.location = window.location.href; } else { $invalidMsg.css('display', 'flex'); self.removeClass('disabled'); $licenseInput.prop('enabled', true); spinner.hide(); } } else if ( data.includes( 'Unregistered Key' ) ) { window.location = window.location.href; } else { result.append( $('<p />').addClass('vamtam-check-license-response').append(data) ); spinner.hide(); self.removeClass('disabled'); $licenseInput.prop('disabled', false); } } }); });
Leave a Comment