Changeset 3340368
- Timestamp:
- 08/06/2025 12:37:16 PM (8 months ago)
- Location:
- otpfy-your-website/trunk
- Files:
-
- 3 edited
-
otpfy-for-wordpress.php (modified) (2 diffs)
-
public/class-otpfy-for-wordpress-public.php (modified) (1 diff)
-
public/js/otpfy-checkout.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
otpfy-your-website/trunk/otpfy-for-wordpress.php
r3340312 r3340368 12 12 * Plugin URI: https://otpfy.in 13 13 * Description: OTPfy almost anything in your wordpress website!! OTP based Login, Signup, Order Confirmation, just anything you can imagine. Integrate OTP based 2 factor authentication using our developer hooks. 14 * Version: 1.0.3 14 * Version: 1.0.3.2 15 15 * Author: Bitss Techniques 16 16 * Author URI: https://bitss.tech … … 31 31 * Rename this for your plugin and update it as you release new versions. 32 32 */ 33 define( 'OTPFY_FOR_WORDPRESS_VERSION', '1.0.3 ' );33 define( 'OTPFY_FOR_WORDPRESS_VERSION', '1.0.3.2' ); 34 34 35 35 /** -
otpfy-your-website/trunk/public/class-otpfy-for-wordpress-public.php
r3340312 r3340368 464 464 465 465 function woocommerce_checkout_process(){ 466 if (is_user_logged_in()) { 466 $get_checkout_verify = $this->settings->get_checkout_verify(); 467 if($get_checkout_verify == "off") return; 468 if($get_checkout_verify == "cod" && !isset($_POST['payment_method']) && !isset($_POST['payment_method_cod'])){ 469 return; // Skip OTP for non-COD payments 470 } 471 if (is_user_logged_in()) { 467 472 $is_verified = get_user_meta(get_current_user_id(), '_otp_verified', true); 468 473 } else { -
otpfy-your-website/trunk/public/js/otpfy-checkout.js
r3340312 r3340368 62 62 63 63 // WooCommerce JS hook: 64 $('form.checkout').on('checkout_place_order', function() { 64 //$('form.checkout').on('checkout_place_order', function(e) { 65 $(document).on('click', '#place_order', function(e) { 65 66 if (otpVerified) return true; 66 67 if(otpfy_checkout_params.checkout_verify == "off") return true; … … 69 70 } 70 71 sendOTP(); 72 e.preventDefault(); // Prevent form submission 73 e.stopImmediatePropagation(); 71 74 return false; // Always block until verified! 72 75 }); … … 75 78 if (otpVerified) return true; // Skip if already verified 76 79 let mobile = $('#billing_phone').val(); 80 if (!mobile) { 81 mobile = $('#shipping_phone').val(); 82 } 77 83 $('.otpfy-otp-form-resend').hide(); 78 84 if (!mobile) { … … 117 123 } 118 124 let mobile = $('#billing_phone').val(); 125 if (!mobile) { 126 mobile = $('#shipping_phone').val(); 127 } 119 128 $('#otp-msg').text('Verifying...'); 120 129 $.post(otpfy_checkout_params.ajax_url, {
Note: See TracChangeset
for help on using the changeset viewer.