Changeset 2935472
- Timestamp:
- 07/07/2023 08:04:42 AM (3 years ago)
- Location:
- splitit-installment-payments
- Files:
-
- 2 edited
-
tags/4.0.0/splitIt-flexfields-payment-gateway.php (modified) (2 diffs)
-
trunk/splitIt-flexfields-payment-gateway.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
splitit-installment-payments/tags/4.0.0/splitIt-flexfields-payment-gateway.php
r2934336 r2935472 76 76 } 77 77 78 send_slack_notification( 'Splitit app has been activate \n Domain: <' . URL . '|' . DOMAIN . '> \n Platform: Woocommerce' ); 78 // Check if the plugin was previously activated. 79 $previous_activation_time = get_option( 'splitit_last_activation_time' ); 80 81 if ( $previous_activation_time && ( time() - $previous_activation_time ) < 3600 ) { 82 // If the previous activation was less than an 1 hour ago, stop executing the function. 83 return; 84 } 85 86 send_slack_notification( 'Splitit app has been activated \n Domain: <' . URL . '|' . DOMAIN . '> \n Platform: Woocommerce' ); 79 87 send_info( 'activate' ); 88 89 // Save the activation time. 90 update_option( 'splitit_last_activation_time', time() ); 80 91 } 81 92 register_activation_hook( __FILE__, 'splitit_activate' ); … … 85 96 */ 86 97 function splitit_deactivate() { 87 send_slack_notification( 'Splitit app has been deactivate \n Domain: <' . URL . '|' . DOMAIN . '> \n Platform: Woocommerce' ); 98 // Check if the plugin was previously deactivated. 99 $previous_deactivation_time = get_option( 'splitit_last_deactivation_time' ); 100 101 if ( $previous_deactivation_time && ( time() - $previous_deactivation_time ) < 3600 ) { 102 // If the previous deactivation was less than an 1 hour ago, stop executing the function. 103 return; 104 } 105 106 send_slack_notification( 'Splitit app has been deactivated \n Domain: <' . URL . '|' . DOMAIN . '> \n Platform: Woocommerce' ); 88 107 send_info( 'deactivate' ); 108 109 // Save the deactivation time. 110 update_option( 'splitit_last_deactivation_time', time() ); 89 111 } 90 112 register_deactivation_hook( __FILE__, 'splitit_deactivate' ); -
splitit-installment-payments/trunk/splitIt-flexfields-payment-gateway.php
r2934336 r2935472 76 76 } 77 77 78 send_slack_notification( 'Splitit app has been activate \n Domain: <' . URL . '|' . DOMAIN . '> \n Platform: Woocommerce' ); 78 // Check if the plugin was previously activated. 79 $previous_activation_time = get_option( 'splitit_last_activation_time' ); 80 81 if ( $previous_activation_time && ( time() - $previous_activation_time ) < 3600 ) { 82 // If the previous activation was less than an 1 hour ago, stop executing the function. 83 return; 84 } 85 86 send_slack_notification( 'Splitit app has been activated \n Domain: <' . URL . '|' . DOMAIN . '> \n Platform: Woocommerce' ); 79 87 send_info( 'activate' ); 88 89 // Save the activation time. 90 update_option( 'splitit_last_activation_time', time() ); 80 91 } 81 92 register_activation_hook( __FILE__, 'splitit_activate' ); … … 85 96 */ 86 97 function splitit_deactivate() { 87 send_slack_notification( 'Splitit app has been deactivate \n Domain: <' . URL . '|' . DOMAIN . '> \n Platform: Woocommerce' ); 98 // Check if the plugin was previously deactivated. 99 $previous_deactivation_time = get_option( 'splitit_last_deactivation_time' ); 100 101 if ( $previous_deactivation_time && ( time() - $previous_deactivation_time ) < 3600 ) { 102 // If the previous deactivation was less than an 1 hour ago, stop executing the function. 103 return; 104 } 105 106 send_slack_notification( 'Splitit app has been deactivated \n Domain: <' . URL . '|' . DOMAIN . '> \n Platform: Woocommerce' ); 88 107 send_info( 'deactivate' ); 108 109 // Save the deactivation time. 110 update_option( 'splitit_last_deactivation_time', time() ); 89 111 } 90 112 register_deactivation_hook( __FILE__, 'splitit_deactivate' );
Note: See TracChangeset
for help on using the changeset viewer.