PageSourceSearch

https://omega3innovations.com/wp-content/plugins/self-service-dash…/assets/js/front-end.js?ver=7.0.3

js omega3innovations.com collected 2026-09-26 08:30:24 UTC 4,357 bytes, 116 lines download raw bytes

1/**
2 * Front end JS
3 *
4 * @package SForce for WooCommerce Subscriptions
5 * @since 1.0.0
6 */
7
8jQuery(
9    function ($) {
10        let sub_details = $('.shop_table.subscription_details');
11
12        // Change Date - Cancel button event.
13        sub_details.on(
14            'click',
15            '#sf-subscription-change-date-cancel',
16            function (e) {
17                e.preventDefault();
18
19                $('#sf-change-date-subscription').remove();
20                $('.sf-change-payment-date.button').show();
21            }
22        );
23
24        // Change date subscription button event.
25        sub_details.on(
26            'click',
27            '.sf-change-payment-date',
28            function (e) {
29                e.preventDefault();
30
31                $('#sf-change-date-subscription').remove();
32
33                let $subscription_id = $(this).attr('data-id');
34
35                $.ajax(
36                    {
37                        url: sf_sf_js.ajax_url,
38                        type: 'post',
39                        data: {
40                            action: 'sf_change_payment_date_subscription',
41                            nonce: sf_sf_js.nonce,
42                            subscription_id: $subscription_id,
43                        },
44                        complete: function () {
45
46                        },
47                        success: function (response) {
48                            if ($('.subscription_details .sf-change-payment-date').length > 0 && $('#sf-change-date-subscription').length === 0 ) {
49                                $('.sf-change-payment-date.button').hide();
50                                $(response.data.html).insertAfter('.sf-change-payment-date');
51                            }
52                        },
53                        error: function (XMLHttpRequest, textStatus, errorThrown) {
54                            if (XMLHttpRequest.status == 0) {
55                                console.error('Network connectivity error.');
56                            } else {
57                                console.error(XMLHttpRequest.responseText);
58                            }
59                        }
60                    }
61                );
62            }
63        );
64
65        sub_details.on(
66            'click',
67            '#sf-subscription-change-date-submit',
68            function (e) {
69                e.preventDefault();
70
71                let serialized = $('#sf-change-date-form').serialize();
72                $('#sf-subscription-change-date-submit').attr('disabled', true);
73
74                $.ajax(
75                    {
76                        url: sf_sf_js.ajax_url,
77                        type: 'post',
78                        data: {
79                            action: 'sf_change_date_subscription_submit',
80                            nonce: sf_sf_js.nonce,
81                            data: serialized,
82                        },
83                        complete: function () {
84
85                        },
86                        success: function (response) {
87                            $('#sf-change-date-subscription').slide
87Up(500).remove();
88                            try {
89                                let noticeType = (response && response.error) ? 'error' : 'success';
90                                window.sessionStorage.setItem(
91                                    'ssd_persisted_notice',
92                                    JSON.stringify({
93                                        message: $('<div />').html(response.data.html).text().trim(),
94                                        type: noticeType,
95                                        ts: Date.now(),
96                                    })
97                                );
98                            } catch (e) {
99                                // no-op
100                            }
101                            location.reload();
102                        },
103                        error: function (XMLHttpRequest, textStatus, errorThrown) {
104                            if (XMLHttpRequest.status == 0) {
105                                console.error('Network connectivity error.');
106                            } else {
107                                console.error(XMLHttpRequest.responseText);
108                            }
109                        }
110                    }
111                );
112            }
113        );
114    }
115);
116

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.