Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,3 @@
</div>
</form>
</div>

<script>
jQuery('#check-soap').on('click', function(e) {
jQuery.ajax({
url: "<?php echo get_rest_url(null, 'wp-acore/v1/server-info'); ?>",
success: function(response) {
jQuery('#ajax-message').html('<div class="notice notice-info"><p>SOAP Response: <strong>' + response.message + '</strong></p></div>');
},
error: function(response) {
jQuery('#ajax-message').html('<div class="notice notice-error"><p>An unknown error happens requesting SOAP status.</div>');
},
})
});
jQuery('#eluna_recruit_a_friend').on('change', function() {
jQuery('.eluna_raf_config').toggle();
})
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,10 @@
<script>
jQuery('#check-soap').on('click', function(e) {
jQuery.ajax({
url: "<?php echo get_rest_url(null, ACORE_SLUG . '/v1/server-info'); ?>",
url: "<?= get_rest_url(null, ACORE_SLUG . '/v1/server-info'); ?>",
data: {
_wpnonce: "<?= wp_create_nonce( 'wp_rest' ); ?>"
},
success: function(response) {
jQuery('#ajax-message').html('<div class="notice notice-info"><p>SOAP Response: <strong>' + response.message + '</strong></p></div>');
},
Expand Down