PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 1.4.0
Subscriptions for WooCommerce with Stripe Recurring Payments v1.4.0
2.0.0 1.11.2 1.11.1 1.11.0 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.6 1.9.5 trunk 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 All 61 releases
subscription / assets / js / installer.js

installer.js in Subscriptions for WooCommerce with Stripe Recurring Payments 1.4.0, at assets/js/installer.js

53 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 jQuery( document ).ready( function ( $ ) {
2 $( '.sdevs-loading-icon' ).hide();
3
4 $( '.sdevs-install-plugin' ).click( () => {
5 install_woocommerce_plugin();
6 } );
7
8 $( '.sdevs-activate-plugin' ).click( () => {
9 activate_woocommerce_plugin();
10 } );
11
12 function install_woocommerce_plugin() {
13 $.ajax( {
14 type: 'POST',
15 url: sdevs_installer_helper_obj.ajax_url,
16 data: {
17 install_plugin: 'woocommerce',
18 action: 'install_woocommerce_plugin',
19 },
20 beforeSend: function () {
21 $( '.sdevs-loading-icon' ).show();
22 },
23 success: function ( data ) {
24 activate_woocommerce_plugin();
25 },
26 complete: function () {
27 console.log( 'Plugin installed' );
28 },
29 } );
30 }
31
32 function activate_woocommerce_plugin() {
33 $.ajax( {
34 type: 'POST',
35 url: sdevs_installer_helper_obj.ajax_url,
36 data: {
37 activate_plugin: 'woocommerce',
38 action: 'activate_woocommerce_plugin',
39 },
40 beforeSend: function () {
41 $( '.sdevs-loading-icon' ).show();
42 },
43 success: function ( data ) {
44 window.location.reload();
45 },
46 complete: function () {
47 console.log( 'Plugin activated' );
48 window.location.reload();
49 },
50 } );
51 }
52 } );
53