| 1 |
function wpSubsInstallPaypalIntegration() { |
| 2 |
jQuery |
| 3 |
.post(wpSubsIntegrations.ajax_url, { |
| 4 |
action_callback: "wp_subs_install_paypal_integration", |
| 5 |
nonce: wpSubsIntegrations.nonce, |
| 6 |
}) |
| 7 |
.done(function (response) { |
| 8 |
console.log(response); |
| 9 |
|
| 10 |
if (response.success) { |
| 11 |
console.log("Option updated:", response.data); |
| 12 |
} else { |
| 13 |
console.error("Failed to update:", response.data); |
| 14 |
} |
| 15 |
}) |
| 16 |
.fail(function () { |
| 17 |
console.error("AJAX request failed"); |
| 18 |
}); |
| 19 |
} |
| 20 |
|