Changeset 3463125
- Timestamp:
- 02/17/2026 06:42:09 AM (6 weeks ago)
- Location:
- alpha-sms
- Files:
-
- 40 added
- 5 edited
-
tags/1.0.17 (added)
-
tags/1.0.17/LICENSE.txt (added)
-
tags/1.0.17/README.txt (added)
-
tags/1.0.17/admin (added)
-
tags/1.0.17/admin/class-alpha_sms-admin.php (added)
-
tags/1.0.17/admin/css (added)
-
tags/1.0.17/admin/css/alpha_sms-admin.css (added)
-
tags/1.0.17/admin/index.php (added)
-
tags/1.0.17/admin/js (added)
-
tags/1.0.17/admin/js/alpha_sms-admin.js (added)
-
tags/1.0.17/admin/partials (added)
-
tags/1.0.17/admin/partials/alpha_sms-admin-display_campaign.php (added)
-
tags/1.0.17/admin/partials/alpha_sms-admin-display_settings.php (added)
-
tags/1.0.17/alpha_sms.php (added)
-
tags/1.0.17/includes (added)
-
tags/1.0.17/includes/class-alpha_sms-activator.php (added)
-
tags/1.0.17/includes/class-alpha_sms-background.php (added)
-
tags/1.0.17/includes/class-alpha_sms-deactivator.php (added)
-
tags/1.0.17/includes/class-alpha_sms-i18n.php (added)
-
tags/1.0.17/includes/class-alpha_sms-loader.php (added)
-
tags/1.0.17/includes/class-alpha_sms.php (added)
-
tags/1.0.17/includes/index.php (added)
-
tags/1.0.17/includes/sms.class.php (added)
-
tags/1.0.17/index.php (added)
-
tags/1.0.17/languages (added)
-
tags/1.0.17/languages/alpha_sms.pot (added)
-
tags/1.0.17/public (added)
-
tags/1.0.17/public/class-alpha_sms-public.php (added)
-
tags/1.0.17/public/css (added)
-
tags/1.0.17/public/css/alpha_sms-public.css (added)
-
tags/1.0.17/public/css/otp-login-form.css (added)
-
tags/1.0.17/public/index.php (added)
-
tags/1.0.17/public/js (added)
-
tags/1.0.17/public/js/alpha_sms-public.js (added)
-
tags/1.0.17/public/js/otp-login-form.js (added)
-
tags/1.0.17/public/partials (added)
-
tags/1.0.17/public/partials/add-otp-checkout-form.php (added)
-
tags/1.0.17/public/partials/add-otp-on-login-form.php (added)
-
tags/1.0.17/public/partials/add-otp-on-wc-reg-form.php (added)
-
tags/1.0.17/uninstall.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/alpha_sms.php (modified) (2 diffs)
-
trunk/includes/class-alpha_sms-loader.php (modified) (1 diff)
-
trunk/includes/class-alpha_sms.php (modified) (1 diff)
-
trunk/public/class-alpha_sms-public.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
alpha-sms/trunk/README.txt
r3432651 r3463125 5 5 Tested up to: 6.9 6 6 Requires PHP: 5.6 7 Stable tag: 1.0.1 67 Stable tag: 1.0.17 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 60 60 == Changelog == 61 61 62 = 1.0.17 = 63 * Save verified registration phone numbers to user profile metadata for OTP login reuse. 64 * Scope registration nonce checks to form POSTs so user meta sync runs on hook calls. 65 62 66 = 1.0.13 = 63 67 * Added a background processor so campaign SMS messages are queued individually and sent by scheduled jobs. -
alpha-sms/trunk/alpha_sms.php
r3432651 r3463125 17 17 * Plugin URI: https://sms.net.bd/plugins/wordpress 18 18 * Description: WP 2FA Login. SMS OTP Verification for Registration and Login forms, WooCommerce SMS Notification for your shop orders. 19 * Version: 1.0.1 619 * Version: 1.0.17 20 20 * Author: Alpha Net 21 21 * Author URI: https://sms.net.bd/ … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define('ALPHA_SMS_VERSION', '1.0.1 6');38 define('ALPHA_SMS_VERSION', '1.0.17'); 39 39 40 40 // plugin constants -
alpha-sms/trunk/includes/class-alpha_sms-loader.php
r2627862 r3463125 1 1 <?php 2 2 if ( ! defined( 'ABSPATH' ) ) exit; 3 3 /** 4 4 * Register all actions and filters for the plugin -
alpha-sms/trunk/includes/class-alpha_sms.php
r3432651 r3463125 77 77 $this->version = ALPHA_SMS_VERSION; 78 78 } else { 79 $this->version = '1.0.1 6';79 $this->version = '1.0.17'; 80 80 } 81 81 $this->plugin_name = 'alpha_sms'; -
alpha-sms/trunk/public/class-alpha_sms-public.php
r3432662 r3463125 609 609 } 610 610 611 $is_post_request = isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST'; 612 $action_type = isset($_POST['action_type']) ? sanitize_text_field(wp_unslash($_POST['action_type'])) : ''; 613 611 614 // Nonce validation for WooCommerce registration phone field: require nonce when wc_reg option enabled 612 if ( ! empty($this->options['wc_reg'])) {615 if ($is_post_request && $action_type === 'wc_reg' && ! empty($this->options['wc_reg'])) { 613 616 $wc_reg_phone_nonce = isset($_POST['wc_reg_phone_nonce']) ? sanitize_text_field(wp_unslash($_POST['wc_reg_phone_nonce'])) : ''; 614 617 if (empty($wc_reg_phone_nonce) || ! function_exists('wp_verify_nonce') || ! wp_verify_nonce($wc_reg_phone_nonce, 'wc_reg_phone_action')) { … … 623 626 624 627 // Nonce validation for WP registration phone field: require nonce when wp_reg option enabled 625 if ( ! empty($this->options['wp_reg'])) {628 if ($is_post_request && $action_type === 'wp_reg' && ! empty($this->options['wp_reg'])) { 626 629 $wp_reg_phone_nonce = isset($_POST['wp_reg_phone_nonce']) ? sanitize_text_field(wp_unslash($_POST['wp_reg_phone_nonce'])) : ''; 627 630 if (empty($wp_reg_phone_nonce) || ! function_exists('wp_verify_nonce') || ! wp_verify_nonce($wp_reg_phone_nonce, 'wp_reg_phone_action')) { … … 641 644 $billing_phone = sanitize_text_field(wp_unslash($_POST['billing_phone'])); 642 645 if ($this->validateNumber($billing_phone)) { 643 update_user_meta( 644 $customer_id, 645 'billing_phone', 646 $this->validateNumber($billing_phone) 647 ); 648 } 649 } 646 $this->save_verified_phone_to_user_profile($customer_id, $billing_phone); 647 } 648 } 649 } 650 651 /** 652 * Save verified phone to user profile meta 653 * 654 * @param int $user_id User ID 655 * @param string $phone Phone number 656 */ 657 public function save_verified_phone_to_user_profile($user_id, $phone) 658 { 659 if (empty($user_id) || empty($phone)) { 660 return; 661 } 662 663 $validated_phone = $this->validateNumber($phone); 664 if (!$validated_phone) { 665 return; 666 } 667 668 update_user_meta($user_id, 'billing_phone', $validated_phone); 669 update_user_meta($user_id, 'mobile_phone', $validated_phone); 650 670 } 651 671
Note: See TracChangeset
for help on using the changeset viewer.