Plugin Directory

Changeset 3798076


Ignore:
Timestamp:
11/12/2026 10:39:58 AM (3 days ago)
Author:
beralabs
Message:

Release i18n language packs for ES, DE, FR and DACH/ES/FR SEO keywords

Location:
cod-anti-fraud-for-woocommerce
Files:
38 added
16 edited

Legend:

Unmodified
Added
Removed
  • cod-anti-fraud-for-woocommerce/tags/2.0.2/includes/class-wccaf-admin.php

    r3778566 r3798076  
    4444                        '<a href="%s">%s</a>',
    4545                        esc_url( $settings_url ),
    46                         esc_html__( 'Settings', 'woo-cod-antifraud' )
     46                        esc_html__( 'Settings', 'cod-anti-fraud-for-woocommerce' )
    4747                );
    4848                array_unshift( $links, $settings_link );
    … …  
    142142
    143143                $custom_message                    = isset( $input['custom_message_template'] ) ? sanitize_textarea_field( $input['custom_message_template'] ) : '';
    144                 $output['custom_message_template'] = ! empty( $custom_message ) ? $custom_message : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'woo-cod-antifraud' );
     144                $output['custom_message_template'] = ! empty( $custom_message ) ? $custom_message : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' );
    145145
    146146                return $output;
    … …  
    162162                        add_meta_box(
    163163                                'wccaf_order_meta_box',
    164                                 esc_html__( 'COD & WhatsApp Anti-Fraud Analysis', 'woo-cod-antifraud' ),
     164                                esc_html__( 'COD & WhatsApp Anti-Fraud Analysis', 'cod-anti-fraud-for-woocommerce' ),
    165165                                array( $this, 'render_order_meta_box' ),
    166166                                $screen,
    … …  
    194194                if ( 'cod' !== $order->get_payment_method() ) {
    195195                        ?>
    196                         <p><?php esc_html_e( 'This order did not use Cash on Delivery payment method.', 'woo-cod-antifraud' ); ?></p>
     196                        <p><?php esc_html_e( 'This order did not use Cash on Delivery payment method.', 'cod-anti-fraud-for-woocommerce' ); ?></p>
    197197                        <?php
    198198                        return;
    … …  
    212212                <div style="font-size:14px; line-height:1.6;">
    213213                        <p>
    214                                 <strong><?php esc_html_e( 'WhatsApp Verification Status:', 'woo-cod-antifraud' ); ?></strong><br>
     214                                <strong><?php esc_html_e( 'WhatsApp Verification Status:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br>
    215215                                <?php if ( 'yes' === $whitelisted ) : ?>
    216                                         <span style="color:#fff; background:#0275d8; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'WHITELISTED CUSTOMER (VIP)', 'woo-cod-antifraud' ); ?></span>
     216                                        <span style="color:#fff; background:#0275d8; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'WHITELISTED CUSTOMER (VIP)', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    217217                                <?php elseif ( 'yes' === $verified ) : ?>
    218                                         <span style="color:#fff; background:#5cb85c; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'VERIFIED VIA WHATSAPP', 'woo-cod-antifraud' ); ?></span>
     218                                        <span style="color:#fff; background:#5cb85c; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'VERIFIED VIA WHATSAPP', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    219219                                <?php elseif ( 'no' === $otp_required ) : ?>
    220                                         <span style="color:#333; background:#e0e0e0; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'BYPASSED (BELOW THRESHOLD)', 'woo-cod-antifraud' ); ?></span>
     220                                        <span style="color:#333; background:#e0e0e0; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'BYPASSED (BELOW THRESHOLD)', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    221221                                <?php else : ?>
    222                                         <span style="color:#fff; background:#d9534f; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'NOT VERIFIED', 'woo-cod-antifraud' ); ?></span>
     222                                        <span style="color:#fff; background:#d9534f; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'NOT VERIFIED', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    223223                                <?php endif; ?>
    224224                        </p>
    225225
    226226                        <p>
    227                                 <strong><?php esc_html_e( 'Risk Score:', 'woo-cod-antifraud' ); ?></strong><br>
     227                                <strong><?php esc_html_e( 'Risk Score:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br>
    228228                                <span style="background:<?php echo esc_attr( $badge_color ); ?>; color:#fff; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php echo esc_html( (string) $score_val ); ?> / 100</span>
    229229                        </p>
    … …  
    231231                        <?php if ( $phone ) : ?>
    232232                                <p>
    233                                         <strong><?php esc_html_e( 'Verified Phone Number:', 'woo-cod-antifraud' ); ?></strong><br>
     233                                        <strong><?php esc_html_e( 'Verified Phone Number:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br>
    234234                                        <code><?php echo esc_html( (string) $phone ); ?></code>
    235235                                </p>
    … …  
    238238                        <?php if ( $timestamp ) : ?>
    239239                                <p>
    240                                         <strong><?php esc_html_e( 'Verification Date and Time:', 'woo-cod-antifraud' ); ?></strong><br>
     240                                        <strong><?php esc_html_e( 'Verification Date and Time:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br>
    241241                                        <small><?php echo esc_html( (string) $timestamp ); ?></small>
    242242                                </p>
  • cod-anti-fraud-for-woocommerce/tags/2.0.2/includes/class-wccaf-checkout.php

    r3778566 r3798076  
    113113                                'max_cart_action'     => $max_action,
    114114                                'verification_timing' => $verification_timing,
    115                                 'not_configured_msg'  => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', 'woo-cod-antifraud' ),
     115                                'not_configured_msg'  => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', 'cod-anti-fraud-for-woocommerce' ),
    116116                                'i18n'                => array(
    117                                         'enter_phone'    => __( 'Please enter your phone number in the billing form first.', 'woo-cod-antifraud' ),
    118                                         'invalid_phone'  => __( 'Please enter a valid phone number in the billing form.', 'woo-cod-antifraud' ),
    119                                         'sending_otp'    => __( 'Sending OTP code...', 'woo-cod-antifraud' ),
    120                                         'resend_btn'     => __( 'Resend WhatsApp Code', 'woo-cod-antifraud' ),
    121                                         'send_error'     => __( 'Error while sending OTP.', 'woo-cod-antifraud' ),
    122                                         'conn_error'     => __( 'Server connection error. Please try again.', 'woo-cod-antifraud' ),
    123                                         'enter_6_digits' => __( 'Please enter the 6-digit code received before verifying.', 'woo-cod-antifraud' ),
    124                                         'verifying'      => __( 'Verifying code...', 'woo-cod-antifraud' ),
    125                                         'verified_btn'   => __( 'Verified', 'woo-cod-antifraud' ),
    126                                         'invalid_otp'    => __( 'Invalid or expired OTP code.', 'woo-cod-antifraud' ),
    127                                         'verify_error'   => __( 'Error during verification with server.', 'woo-cod-antifraud' ),
    128                                         'missing_phone'    => __( 'Missing phone number.', 'woo-cod-antifraud' ),
    129                                         'otp_sent'         => __( 'OTP code sent successfully!', 'woo-cod-antifraud' ),
    130                                         'verified_success' => __( 'Number verified successfully!', 'woo-cod-antifraud' ),
     117                                        'enter_phone'    => __( 'Please enter your phone number in the billing form first.', 'cod-anti-fraud-for-woocommerce' ),
     118                                        'invalid_phone'  => __( 'Please enter a valid phone number in the billing form.', 'cod-anti-fraud-for-woocommerce' ),
     119                                        'sending_otp'    => __( 'Sending OTP code...', 'cod-anti-fraud-for-woocommerce' ),
     120                                        'resend_btn'     => __( 'Resend WhatsApp Code', 'cod-anti-fraud-for-woocommerce' ),
     121                                        'send_error'     => __( 'Error while sending OTP.', 'cod-anti-fraud-for-woocommerce' ),
     122                                        'conn_error'     => __( 'Server connection error. Please try again.', 'cod-anti-fraud-for-woocommerce' ),
     123                                        'enter_6_digits' => __( 'Please enter the 6-digit code received before verifying.', 'cod-anti-fraud-for-woocommerce' ),
     124                                        'verifying'      => __( 'Verifying code...', 'cod-anti-fraud-for-woocommerce' ),
     125                                        'verified_btn'   => __( 'Verified', 'cod-anti-fraud-for-woocommerce' ),
     126                                        'invalid_otp'    => __( 'Invalid or expired OTP code.', 'cod-anti-fraud-for-woocommerce' ),
     127                                        'verify_error'   => __( 'Error during verification with server.', 'cod-anti-fraud-for-woocommerce' ),
     128                                        'missing_phone'    => __( 'Missing phone number.', 'cod-anti-fraud-for-woocommerce' ),
     129                                        'otp_sent'         => __( 'OTP code sent successfully!', 'cod-anti-fraud-for-woocommerce' ),
     130                                        'verified_success' => __( 'Number verified successfully!', 'cod-anti-fraud-for-woocommerce' ),
    131131                                ),
    132132                        );
    … …  
    157157                                        <span style="font-size:22px; line-height:1;">📱</span>
    158158                                        <div>
    159                                                 <strong style="color:#004085; font-size:14px;"><?php esc_html_e( 'Cash on Delivery verification after order confirmation', 'woo-cod-antifraud' ); ?></strong>
     159                                                <strong style="color:#004085; font-size:14px;"><?php esc_html_e( 'Cash on Delivery verification after order confirmation', 'cod-anti-fraud-for-woocommerce' ); ?></strong>
    160160                                                <p style="margin:4px 0 0 0; font-size:13px; color:#383d41;">
    161                                                         <?php esc_html_e( 'You will receive the OTP code via WhatsApp immediately after confirming the order on the receipt page.', 'woo-cod-antifraud' ); ?>
     161                                                        <?php esc_html_e( 'You will receive the OTP code via WhatsApp immediately after confirming the order on the receipt page.', 'cod-anti-fraud-for-woocommerce' ); ?>
    162162                                                </p>
    163163                                        </div>
    … …  
    171171                        <div class="wc-cod-otp-header">
    172172                                <span class="wc-cod-whatsapp-icon">📱</span>
    173                                 <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Mandatory WhatsApp Verification for Cash on Delivery', 'woo-cod-antifraud' ); ?></h3>
     173                                <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Mandatory WhatsApp Verification for Cash on Delivery', 'cod-anti-fraud-for-woocommerce' ); ?></h3>
    174174                        </div>
    175175
    176176                        <p class="wc-cod-otp-instructions">
    177                                 <?php esc_html_e( 'To complete your Cash on Delivery order, you will receive an OTP code on your WhatsApp number.', 'woo-cod-antifraud' ); ?>
     177                                <?php esc_html_e( 'To complete your Cash on Delivery order, you will receive an OTP code on your WhatsApp number.', 'cod-anti-fraud-for-woocommerce' ); ?>
    178178                        </p>
    179179
    … …  
    181181                        <div class="wc-cod-otp-actions">
    182182                                <button type="button" id="wc-cod-send-otp-btn" class="button wc-cod-btn wc-cod-btn-send">
    183                                         <span>📱 <?php esc_html_e( 'Send WhatsApp Code', 'woo-cod-antifraud' ); ?></span>
     183                                        <span>📱 <?php esc_html_e( 'Send WhatsApp Code', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    184184                                </button>
    185185                        </div>
    … …  
    188188                        <div class="wc-cod-otp-verify-block" id="wc-cod-otp-verify-block">
    189189                                <div class="wc-cod-input-row">
    190                                         <input type="text" id="wc-cod-otp-input" name="wc_cod_otp_input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', 'woo-cod-antifraud' ); ?>" maxlength="6" autocomplete="one-time-code" />
     190                                        <input type="text" id="wc-cod-otp-input" name="wc_cod_otp_input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', 'cod-anti-fraud-for-woocommerce' ); ?>" maxlength="6" autocomplete="one-time-code" />
    191191                                        <button type="button" id="wc-cod-verify-otp-btn" class="button wc-cod-btn wc-cod-btn-verify">
    192                                                 <span><?php esc_html_e( 'Verify Code', 'woo-cod-antifraud' ); ?></span>
     192                                                <span><?php esc_html_e( 'Verify Code', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    193193                                        </button>
    194194                                </div>
    … …  
    241241                        <div class="wc-cod-otp-header">
    242242                                <span class="wc-cod-whatsapp-icon">📱</span>
    243                                 <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Cash on Delivery WhatsApp Verification', 'woo-cod-antifraud' ); ?></h3>
     243                                <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Cash on Delivery WhatsApp Verification', 'cod-anti-fraud-for-woocommerce' ); ?></h3>
    244244                        </div>
    245245
    246246                        <?php if ( 'yes' === $whitelisted ) : ?>
    247247                                <div class="wc-cod-otp-status wc-cod-status-success" style="display:block; margin-top: 14px;">
    248                                         🌟 <strong><?php esc_html_e( 'Trusted Customer (Whitelist)', 'woo-cod-antifraud' ); ?></strong>
     248                                        🌟 <strong><?php esc_html_e( 'Trusted Customer (Whitelist)', 'cod-anti-fraud-for-woocommerce' ); ?></strong>
    249249                                        <p style="margin: 6px 0 0 0;">
    250250                                                <?php
    … …  
    252252                                                        sprintf(
    253253                                                                /* translators: 1: Order ID, 2: Phone number */
    254                                                                 __( 'Order #%1$d was successfully confirmed for phone %2$s without requiring OTP.', 'woo-cod-antifraud' ),
     254                                                                __( 'Order #%1$d was successfully confirmed for phone %2$s without requiring OTP.', 'cod-anti-fraud-for-woocommerce' ),
    255255                                                                intval( $order_id ),
    256256                                                                $phone
    … …  
    262262                        <?php elseif ( 'yes' === $verified ) : ?>
    263263                                <div class="wc-cod-otp-status wc-cod-status-success" style="display:block; margin-top: 14px;">
    264                                         ✅ <strong><?php esc_html_e( 'Number Verified via WhatsApp OTP', 'woo-cod-antifraud' ); ?></strong>
     264                                        ✅ <strong><?php esc_html_e( 'Number Verified via WhatsApp OTP', 'cod-anti-fraud-for-woocommerce' ); ?></strong>
    265265                                        <p style="margin: 6px 0 0 0;">
    266266                                                <?php
    … …  
    268268                                                        sprintf(
    269269                                                                /* translators: 1: Order ID, 2: Phone number */
    270                                                                 __( 'Order #%1$d has passed WhatsApp verification for phone number %2$s.', 'woo-cod-antifraud' ),
     270                                                                __( 'Order #%1$d has passed WhatsApp verification for phone number %2$s.', 'cod-anti-fraud-for-woocommerce' ),
    271271                                                                intval( $order_id ),
    272272                                                                $phone
    … …  
    282282                                                sprintf(
    283283                                                        /* translators: %s: Customer phone number */
    284                                                         __( 'Enter the OTP code sent via WhatsApp to %s to confirm verification.', 'woo-cod-antifraud' ),
     284                                                        __( 'Enter the OTP code sent via WhatsApp to %s to confirm verification.', 'cod-anti-fraud-for-woocommerce' ),
    285285                                                        $phone
    286286                                                )
    … …  
    291291                                <div class="wc-cod-otp-actions" style="margin-bottom: 12px;">
    292292                                        <button type="button" id="wc-cod-thankyou-resend-btn" class="button wc-cod-btn wc-cod-btn-send" data-phone="<?php echo esc_attr( $phone ); ?>" data-order-id="<?php echo esc_attr( $order_id ); ?>" data-order-key="<?php echo esc_attr( $order_key ); ?>">
    293                                                 <span>📱 <?php esc_html_e( 'Resend WhatsApp Code', 'woo-cod-antifraud' ); ?></span>
     293                                                <span>📱 <?php esc_html_e( 'Resend WhatsApp Code', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    294294                                        </button>
    295295                                </div>
    … …  
    297297                                <div class="wc-cod-otp-verify-block" style="display:block;">
    298298                                        <div class="wc-cod-input-row">
    299                                                 <input type="text" id="wc-cod-thankyou-otp-input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', 'woo-cod-antifraud' ); ?>" maxlength="6" autocomplete="one-time-code" />
     299                                                <input type="text" id="wc-cod-thankyou-otp-input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', 'cod-anti-fraud-for-woocommerce' ); ?>" maxlength="6" autocomplete="one-time-code" />
    300300                                                <input type="hidden" id="wc-cod-thankyou-order-key" value="<?php echo esc_attr( $order_key ); ?>" />
    301301                                                <button type="button" id="wc-cod-thankyou-verify-btn" class="button wc-cod-btn wc-cod-btn-verify" data-phone="<?php echo esc_attr( $phone ); ?>" data-order-id="<?php echo esc_attr( $order_id ); ?>" data-order-key="<?php echo esc_attr( $order_key ); ?>">
    302                                                         <span><?php esc_html_e( 'Verify Code', 'woo-cod-antifraud' ); ?></span>
     302                                                        <span><?php esc_html_e( 'Verify Code', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    303303                                                </button>
    304304                                        </div>
    … …  
    322322                        return array(
    323323                                'valid'   => false,
    324                                 'message' => __( 'WooCommerce is not available.', 'woo-cod-antifraud' ),
     324                                'message' => __( 'WooCommerce is not available.', 'cod-anti-fraud-for-woocommerce' ),
    325325                        );
    326326                }
    … …  
    330330                        return array(
    331331                                'valid'   => false,
    332                                 'message' => __( 'Invalid order specified.', 'woo-cod-antifraud' ),
     332                                'message' => __( 'Invalid order specified.', 'cod-anti-fraud-for-woocommerce' ),
    333333                        );
    334334                }
    … …  
    337337                        return array(
    338338                                'valid'   => false,
    339                                 'message' => __( 'The specified order does not use Cash on Delivery.', 'woo-cod-antifraud' ),
     339                                'message' => __( 'The specified order does not use Cash on Delivery.', 'cod-anti-fraud-for-woocommerce' ),
    340340                        );
    341341                }
    … …  
    368368                        return array(
    369369                                'valid'   => false,
    370                                 'message' => __( 'Permission denied or invalid order verification key.', 'woo-cod-antifraud' ),
     370                                'message' => __( 'Permission denied or invalid order verification key.', 'cod-anti-fraud-for-woocommerce' ),
    371371                        );
    372372                }
    … …  
    382382                                return array(
    383383                                        'valid'   => false,
    384                                         'message' => __( 'The verified phone number does not match the billing phone number of this order.', 'woo-cod-antifraud' ),
     384                                        'message' => __( 'The verified phone number does not match the billing phone number of this order.', 'cod-anti-fraud-for-woocommerce' ),
    385385                                );
    386386                        }
    … …  
    406406                        wp_send_json_success( array(
    407407                                'blacklisted' => true,
    408                                 'message'     => __( 'Cash on Delivery payment is not available for this address.', 'woo-cod-antifraud' ),
     408                                'message'     => __( 'Cash on Delivery payment is not available for this address.', 'cod-anti-fraud-for-woocommerce' ),
    409409                        ) );
    410410                }
    … …  
    413413                        wp_send_json_success( array(
    414414                                'whitelisted' => true,
    415                                 'message'     => __( 'VIP/Trusted customer: OTP verification not required.', 'woo-cod-antifraud' ),
     415                                'message'     => __( 'VIP/Trusted customer: OTP verification not required.', 'cod-anti-fraud-for-woocommerce' ),
    416416                        ) );
    417417                }
    … …  
    451451                                wp_send_json_success( array(
    452452                                        'already_verified' => true,
    453                                         'message'          => __( 'Order is already verified.', 'woo-cod-antifraud' ),
     453                                        'message'          => __( 'Order is already verified.', 'cod-anti-fraud-for-woocommerce' ),
    454454                                ) );
    455455                        }
    … …  
    480480
    481481                if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) {
    482                         wp_send_json_error( array( 'message' => __( 'Please enter your phone number in the billing form first.', 'woo-cod-antifraud' ) ) );
     482                        wp_send_json_error( array( 'message' => __( 'Please enter your phone number in the billing form first.', 'cod-anti-fraud-for-woocommerce' ) ) );
    483483                }
    484484
    … …  
    487487                        wp_send_json_error( array(
    488488                                'blacklisted' => true,
    489                                 'message'     => __( 'Cash on Delivery is not authorized for this contact. Please select another payment method.', 'woo-cod-antifraud' ),
     489                                'message'     => __( 'Cash on Delivery is not authorized for this contact. Please select another payment method.', 'cod-anti-fraud-for-woocommerce' ),
    490490                        ) );
    491491                }
    … …  
    513513                        wp_send_json_success( array(
    514514                                'whitelisted' => true,
    515                                 'message'     => __( 'Phone number verified automatically (Trusted Whitelist Customer).', 'woo-cod-antifraud' ),
     515                                'message'     => __( 'Phone number verified automatically (Trusted Whitelist Customer).', 'cod-anti-fraud-for-woocommerce' ),
    516516                                'token'       => $token,
    517517                        ) );
    … …  
    527527                $settings = get_option( 'wc_cod_antifraud_settings', array() );
    528528                if ( ! WCCAF_WhatsApp::is_configured( $settings ) ) {
    529                         wp_send_json_error( array( 'message' => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', 'woo-cod-antifraud' ) ) );
     529                        wp_send_json_error( array( 'message' => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', 'cod-anti-fraud-for-woocommerce' ) ) );
    530530                }
    531531
    … …  
    539539                        // Strict Information Leakage Prevention: NEVER return OTP to client
    540540                        wp_send_json_success( array(
    541                                 'message' => __( 'Code sent! Please check your WhatsApp.', 'woo-cod-antifraud' ),
     541                                'message' => __( 'Code sent! Please check your WhatsApp.', 'cod-anti-fraud-for-woocommerce' ),
    542542                        ) );
    543543                } else {
    544                         $error_message = ! empty( $result['message'] ) ? sanitize_text_field( $result['message'] ) : __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'woo-cod-antifraud' );
     544                        $error_message = ! empty( $result['message'] ) ? sanitize_text_field( $result['message'] ) : __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'cod-anti-fraud-for-woocommerce' );
    545545                        wp_send_json_error( array( 'message' => $error_message ) );
    546546                }
    … …  
    578578
    579579                if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) {
    580                         wp_send_json_error( array( 'message' => __( 'Missing or invalid phone number.', 'woo-cod-antifraud' ) ) );
     580                        wp_send_json_error( array( 'message' => __( 'Missing or invalid phone number.', 'cod-anti-fraud-for-woocommerce' ) ) );
    581581                }
    582582
    583583                if ( empty( $otp ) || strlen( $otp ) !== 6 ) {
    584                         wp_send_json_error( array( 'message' => __( 'Please enter a valid 6-digit OTP code.', 'woo-cod-antifraud' ) ) );
     584                        wp_send_json_error( array( 'message' => __( 'Please enter a valid 6-digit OTP code.', 'cod-anti-fraud-for-woocommerce' ) ) );
    585585                }
    586586
    … …  
    598598
    599599                        wp_send_json_success( array(
    600                                 'message' => __( 'Number verified successfully!', 'woo-cod-antifraud' ),
     600                                'message' => __( 'Number verified successfully!', 'cod-anti-fraud-for-woocommerce' ),
    601601                                'token'   => $token,
    602602                        ) );
    … …  
    636636                if ( WCCAF_Risk_Engine::is_blacklisted( $clean_phone, $billing_email ) ) {
    637637                        if ( function_exists( 'wc_add_notice' ) ) {
    638                                 wc_add_notice( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'woo-cod-antifraud' ), 'error' );
     638                                wc_add_notice( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'cod-anti-fraud-for-woocommerce' ), 'error' );
    639639                        }
    640640                        return;
    … …  
    650650                                $notice_msg = sprintf(
    651651                                        /* translators: 1: formatted cart total, 2: formatted maximum amount */
    652                                         __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'woo-cod-antifraud' ),
     652                                        __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'cod-anti-fraud-for-woocommerce' ),
    653653                                        wc_price( $cart_total ),
    654654                                        wc_price( $max_amount )
    … …  
    666666                if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) {
    667667                        if ( function_exists( 'wc_add_notice' ) ) {
    668                                 wc_add_notice( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'woo-cod-antifraud' ), 'error' );
     668                                wc_add_notice( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'cod-anti-fraud-for-woocommerce' ), 'error' );
    669669                        }
    670670                        return;
    … …  
    689689                        if ( ! WCCAF_OTP_Manager::is_phone_verified_in_session( $clean_phone, $token ) ) {
    690690                                if ( function_exists( 'wc_add_notice' ) ) {
    691                                         wc_add_notice( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'woo-cod-antifraud' ), 'error' );
     691                                        wc_add_notice( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'cod-anti-fraud-for-woocommerce' ), 'error' );
    692692                                }
    693693                        }
    … …  
    716716                // 1. Blacklist Check
    717717                if ( WCCAF_Risk_Engine::is_blacklisted( $clean_phone, $billing_email ) ) {
    718                         $errors->add( 'validation', esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'woo-cod-antifraud' ) );
     718                        $errors->add( 'validation', esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'cod-anti-fraud-for-woocommerce' ) );
    719719                        return;
    720720                }
    … …  
    730730                        $notice_msg     = sprintf(
    731731                                /* translators: 1: formatted cart total, 2: formatted maximum amount */
    732                                 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'woo-cod-antifraud' ),
     732                                __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'cod-anti-fraud-for-woocommerce' ),
    733733                                $formatted_cart,
    734734                                $formatted_max
    … …  
    744744
    745745                if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) {
    746                         $errors->add( 'validation', esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'woo-cod-antifraud' ) );
     746                        $errors->add( 'validation', esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'cod-anti-fraud-for-woocommerce' ) );
    747747                        return;
    748748                }
    … …  
    765765                        $token = isset( $_POST['wc_cod_otp_token'] ) ? sanitize_text_field( wp_unslash( $_POST['wc_cod_otp_token'] ) ) : '';
    766766                        if ( ! WCCAF_OTP_Manager::is_phone_verified_in_session( $clean_phone, $token ) ) {
    767                                 $errors->add( 'validation', esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'woo-cod-antifraud' ) );
     767                                $errors->add( 'validation', esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'cod-anti-fraud-for-woocommerce' ) );
    768768                        }
    769769                }
    … …  
    795795                // 1. Blacklist Check
    796796                if ( WCCAF_Risk_Engine::is_blacklisted( $clean_phone, $billing_email ) ) {
    797                         throw new \Exception( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'woo-cod-antifraud' ) );
     797                        throw new \Exception( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'cod-anti-fraud-for-woocommerce' ) );
    798798                }
    799799
    … …  
    808808                        $exception_msg  = sprintf(
    809809                                /* translators: 1: formatted cart total, 2: formatted maximum amount */
    810                                 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'woo-cod-antifraud' ),
     810                                __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'cod-anti-fraud-for-woocommerce' ),
    811811                                $formatted_cart,
    812812                                $formatted_max
    … …  
    821821
    822822                if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) {
    823                         throw new \Exception( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'woo-cod-antifraud' ) );
     823                        throw new \Exception( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'cod-anti-fraud-for-woocommerce' ) );
    824824                }
    825825
    … …  
    839839                if ( $is_required ) {
    840840                        if ( ! WCCAF_OTP_Manager::is_phone_verified_in_session( $clean_phone ) ) {
    841                                 throw new \Exception( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'woo-cod-antifraud' ) );
     841                                throw new \Exception( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'cod-anti-fraud-for-woocommerce' ) );
    842842                        }
    843843                }
    … …  
    867867                        // Strict Integrity Gate: se OTP è obbligatorio in pre-checkout, impedire la creazione dell'ordine non verificato
    868868                        if ( 'pre_checkout' === $timing && $required && 'yes' !== $is_verified ) {
    869                                 throw new \Exception( esc_html__( 'Cash on Delivery order cannot be placed without completing WhatsApp OTP phone verification.', 'woo-cod-antifraud' ) );
     869                                throw new \Exception( esc_html__( 'Cash on Delivery order cannot be placed without completing WhatsApp OTP phone verification.', 'cod-anti-fraud-for-woocommerce' ) );
    870870                        }
    871871
  • cod-anti-fraud-for-woocommerce/tags/2.0.2/includes/class-wccaf-otp-manager.php

    r3778566 r3798076  
    111111                                                'message'     => sprintf(
    112112                                                        /* translators: 1: max requests, 2: minutes left */
    113                                                         __( 'You have exceeded the maximum number of attempts (%1$d requests). Please try again in %2$d minutes.', 'woo-cod-antifraud' ),
     113                                                        __( 'You have exceeded the maximum number of attempts (%1$d requests). Please try again in %2$d minutes.', 'cod-anti-fraud-for-woocommerce' ),
    114114                                                        $max_requests,
    115115                                                        $time_left
    … …  
    134134                                                'message'     => sprintf(
    135135                                                        /* translators: %d: minutes left */
    136                                                         __( 'Too many requests from this IP address. Please try again in %d minutes.', 'woo-cod-antifraud' ),
     136                                                        __( 'Too many requests from this IP address. Please try again in %d minutes.', 'cod-anti-fraud-for-woocommerce' ),
    137137                                                        $time_left
    138138                                                ),
    … …  
    253253                        return array(
    254254                                'success' => false,
    255                                 'message' => __( 'Phone number or OTP code not provided.', 'woo-cod-antifraud' ),
     255                                'message' => __( 'Phone number or OTP code not provided.', 'cod-anti-fraud-for-woocommerce' ),
    256256                        );
    257257                }
    … …  
    271271                        return array(
    272272                                'success' => false,
    273                                 'message' => __( 'OTP code expired or invalid. Please request a new one.', 'woo-cod-antifraud' ),
     273                                'message' => __( 'OTP code expired or invalid. Please request a new one.', 'cod-anti-fraud-for-woocommerce' ),
    274274                        );
    275275                }
    … …  
    289289                        return array(
    290290                                'success' => false,
    291                                 'message' => __( 'OTP code expired. Please request a new one.', 'woo-cod-antifraud' ),
     291                                'message' => __( 'OTP code expired. Please request a new one.', 'cod-anti-fraud-for-woocommerce' ),
    292292                        );
    293293                }
    … …  
    303303                        return array(
    304304                                'success' => false,
    305                                 'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', 'woo-cod-antifraud' ),
     305                                'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', 'cod-anti-fraud-for-woocommerce' ),
    306306                        );
    307307                }
    … …  
    337337                        return array(
    338338                                'success' => true,
    339                                 'message' => __( 'Number verified successfully!', 'woo-cod-antifraud' ),
     339                                'message' => __( 'Number verified successfully!', 'cod-anti-fraud-for-woocommerce' ),
    340340                                'token'   => $token,
    341341                        );
    … …  
    350350                        return array(
    351351                                'success' => false,
    352                                 'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', 'woo-cod-antifraud' ),
     352                                'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', 'cod-anti-fraud-for-woocommerce' ),
    353353                        );
    354354                }
    … …  
    364364                        'message' => sprintf(
    365365                                /* translators: %d: remaining attempts */
    366                                 __( 'Incorrect OTP code. Attempts remaining: %d', 'woo-cod-antifraud' ),
     366                                __( 'Incorrect OTP code. Attempts remaining: %d', 'cod-anti-fraud-for-woocommerce' ),
    367367                                max( 0, $max_attempts - $data['attempts'] )
    368368                        ),
  • cod-anti-fraud-for-woocommerce/tags/2.0.2/includes/class-wccaf-settings.php

    r3778566 r3798076  
    2222        public function __construct() {
    2323                $this->id    = 'wc_cod_antifraud';
    24                 $this->label = __( 'COD Anti-Fraud', 'woo-cod-antifraud' );
     24                $this->label = __( 'COD Anti-Fraud', 'cod-anti-fraud-for-woocommerce' );
    2525
    2626                parent::__construct();
    … …  
    3434        public function get_sections() {
    3535                $sections = array(
    36                         '' => __( 'General Settings', 'woo-cod-antifraud' ),
     36                        '' => __( 'General Settings', 'cod-anti-fraud-for-woocommerce' ),
    3737                );
    3838                // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
    … …  
    4848                $settings = array(
    4949                        array(
    50                                 'title' => __( 'WooCommerce COD Anti-Fraud Settings', 'woo-cod-antifraud' ),
     50                                'title' => __( 'WooCommerce COD Anti-Fraud Settings', 'cod-anti-fraud-for-woocommerce' ),
    5151                                'type'  => 'title',
    52                                 'desc'  => __( 'Configure WhatsApp OTP verification and risk score management for Cash on Delivery orders. Protection is always active and operates in blocking pre-checkout mode before the order is placed.', 'woo-cod-antifraud' ),
     52                                'desc'  => __( 'Configure WhatsApp OTP verification and risk score management for Cash on Delivery orders. Protection is always active and operates in blocking pre-checkout mode before the order is placed.', 'cod-anti-fraud-for-woocommerce' ),
    5353                                'id'    => 'wc_cod_antifraud_options_section',
    5454                        ),
    5555
    5656                        array(
    57                                 'title'    => __( 'OTP Verification Mode (Pre-Checkout Blocking)', 'woo-cod-antifraud' ),
    58                                 'desc'     => __( 'WhatsApp OTP verification occurs directly in cart/checkout before placing the order. Select activation condition.', 'woo-cod-antifraud' ),
     57                                'title'    => __( 'OTP Verification Mode (Pre-Checkout Blocking)', 'cod-anti-fraud-for-woocommerce' ),
     58                                'desc'     => __( 'WhatsApp OTP verification occurs directly in cart/checkout before placing the order. Select activation condition.', 'cod-anti-fraud-for-woocommerce' ),
    5959                                'id'       => 'wc_cod_antifraud_settings[require_otp_mode]',
    6060                                'default'  => 'always',
    6161                                'type'     => 'select',
    6262                                'options'  => array(
    63                                         'always'     => __( 'Always Required (All Cash on Delivery Orders)', 'woo-cod-antifraud' ),
    64                                         'risk_based' => __( 'Conditional (Based on Risk Score or Cart Total)', 'woo-cod-antifraud' ),
    65                                 ),
    66                         ),
    67 
    68                         array(
    69                                 'title'             => __( 'Risk Score Threshold (0-100)', 'woo-cod-antifraud' ),
    70                                 'desc'              => __( 'Require OTP if calculated risk score exceeds this value (only applied in conditional mode).', 'woo-cod-antifraud' ),
     63                                        'always'     => __( 'Always Required (All Cash on Delivery Orders)', 'cod-anti-fraud-for-woocommerce' ),
     64                                        'risk_based' => __( 'Conditional (Based on Risk Score or Cart Total)', 'cod-anti-fraud-for-woocommerce' ),
     65                                ),
     66                        ),
     67
     68                        array(
     69                                'title'             => __( 'Risk Score Threshold (0-100)', 'cod-anti-fraud-for-woocommerce' ),
     70                                'desc'              => __( 'Require OTP if calculated risk score exceeds this value (only applied in conditional mode).', 'cod-anti-fraud-for-woocommerce' ),
    7171                                'id'                => 'wc_cod_antifraud_settings[risk_threshold]',
    7272                                'default'           => '40',
    … …  
    8080
    8181                        array(
    82                                 'title'             => __( 'Minimum Cart Amount for OTP (€)', 'woo-cod-antifraud' ),
    83                                 'desc'              => __( 'Require OTP only if cart total equals or exceeds this amount (0 for no minimum).', 'woo-cod-antifraud' ),
     82                                'title'             => __( 'Minimum Cart Amount for OTP (€)', 'cod-anti-fraud-for-woocommerce' ),
     83                                'desc'              => __( 'Require OTP only if cart total equals or exceeds this amount (0 for no minimum).', 'cod-anti-fraud-for-woocommerce' ),
    8484                                'id'                => 'wc_cod_antifraud_settings[min_cart_amount_otp]',
    8585                                'default'           => '0',
    … …  
    9292
    9393                        array(
    94                                 'title'             => __( 'Maximum COD Cart Threshold (€)', 'woo-cod-antifraud' ),
    95                                 'desc'              => __( 'Maximum cart value above which the high-threshold rule is applied.', 'woo-cod-antifraud' ),
     94                                'title'             => __( 'Maximum COD Cart Threshold (€)', 'cod-anti-fraud-for-woocommerce' ),
     95                                'desc'              => __( 'Maximum cart value above which the high-threshold rule is applied.', 'cod-anti-fraud-for-woocommerce' ),
    9696                                'id'                => 'wc_cod_antifraud_settings[max_cart_amount_cod]',
    9797                                'default'           => '500',
    … …  
    104104
    105105                        array(
    106                                 'title'    => __( 'Action Above Maximum Threshold', 'woo-cod-antifraud' ),
    107                                 'desc'     => __( 'Action to take when cart total exceeds the maximum threshold.', 'woo-cod-antifraud' ),
     106                                'title'    => __( 'Action Above Maximum Threshold', 'cod-anti-fraud-for-woocommerce' ),
     107                                'desc'     => __( 'Action to take when cart total exceeds the maximum threshold.', 'cod-anti-fraud-for-woocommerce' ),
    108108                                'id'       => 'wc_cod_antifraud_settings[max_cart_action]',
    109109                                'default'  => 'require_otp',
    110110                                'type'     => 'select',
    111111                                'options'  => array(
    112                                         'require_otp' => __( 'Require WhatsApp OTP Verification', 'woo-cod-antifraud' ),
    113                                         'disable_cod' => __( 'Disable Cash on Delivery Payment Method', 'woo-cod-antifraud' ),
    114                                 ),
    115                         ),
    116 
    117                         array(
    118                                 'title'       => __( 'Phone / Email Blacklist', 'woo-cod-antifraud' ),
    119                                 'desc'        => __( 'Enter phone numbers or emails to block from Cash on Delivery (one per line or comma-separated).', 'woo-cod-antifraud' ),
     112                                        'require_otp' => __( 'Require WhatsApp OTP Verification', 'cod-anti-fraud-for-woocommerce' ),
     113                                        'disable_cod' => __( 'Disable Cash on Delivery Payment Method', 'cod-anti-fraud-for-woocommerce' ),
     114                                ),
     115                        ),
     116
     117                        array(
     118                                'title'       => __( 'Phone / Email Blacklist', 'cod-anti-fraud-for-woocommerce' ),
     119                                'desc'        => __( 'Enter phone numbers or emails to block from Cash on Delivery (one per line or comma-separated).', 'cod-anti-fraud-for-woocommerce' ),
    120120                                'id'          => 'wc_cod_antifraud_settings[blacklist_phones]',
    121121                                'default'     => '',
    … …  
    125125
    126126                        array(
    127                                 'title'       => __( 'Phone / Email Whitelist (VIP)', 'woo-cod-antifraud' ),
    128                                 'desc'        => __( 'Enter trusted phone numbers or emails to automatically bypass OTP verification (one per line or comma-separated).', 'woo-cod-antifraud' ),
     127                                'title'       => __( 'Phone / Email Whitelist (VIP)', 'cod-anti-fraud-for-woocommerce' ),
     128                                'desc'        => __( 'Enter trusted phone numbers or emails to automatically bypass OTP verification (one per line or comma-separated).', 'cod-anti-fraud-for-woocommerce' ),
    129129                                'id'          => 'wc_cod_antifraud_settings[whitelist_phones]',
    130130                                'default'     => '',
    … …  
    134134
    135135                        array(
    136                                 'title'             => __( 'Max OTP Requests Limit', 'woo-cod-antifraud' ),
    137                                 'desc'              => __( 'Maximum number of OTP requests allowed before temporary lock.', 'woo-cod-antifraud' ),
     136                                'title'             => __( 'Max OTP Requests Limit', 'cod-anti-fraud-for-woocommerce' ),
     137                                'desc'              => __( 'Maximum number of OTP requests allowed before temporary lock.', 'cod-anti-fraud-for-woocommerce' ),
    138138                                'id'                => 'wc_cod_antifraud_settings[rate_limit_max_requests]',
    139139                                'default'           => '3',
    … …  
    146146
    147147                        array(
    148                                 'title'             => __( 'Rate Limit Window (minutes)', 'woo-cod-antifraud' ),
    149                                 'desc'              => __( 'Validity period for request limit in minutes.', 'woo-cod-antifraud' ),
     148                                'title'             => __( 'Rate Limit Window (minutes)', 'cod-anti-fraud-for-woocommerce' ),
     149                                'desc'              => __( 'Validity period for request limit in minutes.', 'cod-anti-fraud-for-woocommerce' ),
    150150                                'id'                => 'wc_cod_antifraud_settings[rate_limit_window_minutes]',
    151151                                'default'           => '10',
    … …  
    158158
    159159                        array(
    160                                 'title'    => __( 'WhatsApp Provider', 'woo-cod-antifraud' ),
    161                                 'desc'     => __( 'Select the WhatsApp provider for sending OTP codes.', 'woo-cod-antifraud' ),
     160                                'title'    => __( 'WhatsApp Provider', 'cod-anti-fraud-for-woocommerce' ),
     161                                'desc'     => __( 'Select the WhatsApp provider for sending OTP codes.', 'cod-anti-fraud-for-woocommerce' ),
    162162                                'id'       => 'wc_cod_antifraud_settings[whatsapp_provider]',
    163163                                'default'  => 'beralabs',
    164164                                'type'     => 'select',
    165165                                'options'  => array(
    166                                         'beralabs' => __( 'BeraLabs Gateway (Proprietary)', 'woo-cod-antifraud' ),
    167                                         'ultramsg' => __( 'UltraMsg API', 'woo-cod-antifraud' ),
    168                                 ),
    169                         ),
    170 
    171                         array(
    172                                 'title'       => __( 'BeraLabs Gateway Endpoint', 'woo-cod-antifraud' ),
    173                                 'desc'        => __( 'Endpoint URL for BeraLabs WhatsApp OTP microservice (e.g., https://api.beralabs.it/wa/api/send-otp).', 'woo-cod-antifraud' ),
     166                                        'beralabs' => __( 'BeraLabs Gateway (Proprietary)', 'cod-anti-fraud-for-woocommerce' ),
     167                                        'ultramsg' => __( 'UltraMsg API', 'cod-anti-fraud-for-woocommerce' ),
     168                                ),
     169                        ),
     170
     171                        array(
     172                                'title'       => __( 'BeraLabs Gateway Endpoint', 'cod-anti-fraud-for-woocommerce' ),
     173                                'desc'        => __( 'Endpoint URL for BeraLabs WhatsApp OTP microservice (e.g., https://api.beralabs.it/wa/api/send-otp).', 'cod-anti-fraud-for-woocommerce' ),
    174174                                'id'          => 'wc_cod_antifraud_settings[beralabs_endpoint]',
    175175                                'default'     => 'https://api.beralabs.it/wa/api/send-otp',
    … …  
    179179
    180180                        array(
    181                                 'title'       => __( 'BeraLabs API Key', 'woo-cod-antifraud' ),
    182                                 'desc'        => __( 'Enter the secret API key (x-api-key) for authentication with BeraLabs gateway.', 'woo-cod-antifraud' ) . '<br><a href="https://beralabs.it/whatsapp-gateway.html" target="_blank" rel="noopener noreferrer" class="button button-secondary" style="margin-top:8px; display:inline-block; font-weight:600;">' . __( 'Request WhatsApp API Key', 'woo-cod-antifraud' ) . ' &rarr;</a>',
     181                                'title'       => __( 'BeraLabs API Key', 'cod-anti-fraud-for-woocommerce' ),
     182                                'desc'        => __( 'Enter the secret API key (x-api-key) for authentication with BeraLabs gateway.', 'cod-anti-fraud-for-woocommerce' ) . '<br><a href="https://beralabs.it/whatsapp-gateway.html" target="_blank" rel="noopener noreferrer" class="button button-secondary" style="margin-top:8px; display:inline-block; font-weight:600;">' . __( 'Request WhatsApp API Key', 'cod-anti-fraud-for-woocommerce' ) . ' &rarr;</a>',
    183183                                'id'          => 'wc_cod_antifraud_settings[beralabs_api_key]',
    184184                                'default'     => '',
    … …  
    188188
    189189                        array(
    190                                 'title'   => __( 'UltraMsg Instance ID', 'woo-cod-antifraud' ),
    191                                 'desc'    => __( 'Enter the Instance ID provided by UltraMsg (e.g., instance12345). Only used if UltraMsg provider is selected.', 'woo-cod-antifraud' ),
     190                                'title'   => __( 'UltraMsg Instance ID', 'cod-anti-fraud-for-woocommerce' ),
     191                                'desc'    => __( 'Enter the Instance ID provided by UltraMsg (e.g., instance12345). Only used if UltraMsg provider is selected.', 'cod-anti-fraud-for-woocommerce' ),
    192192                                'id'      => 'wc_cod_antifraud_settings[instance_id]',
    193193                                'default' => '',
    … …  
    196196
    197197                        array(
    198                                 'title'   => __( 'UltraMsg API Token', 'woo-cod-antifraud' ),
    199                                 'desc'    => __( 'Enter the secret API Token provided by UltraMsg. Only used if UltraMsg provider is selected.', 'woo-cod-antifraud' ),
     198                                'title'   => __( 'UltraMsg API Token', 'cod-anti-fraud-for-woocommerce' ),
     199                                'desc'    => __( 'Enter the secret API Token provided by UltraMsg. Only used if UltraMsg provider is selected.', 'cod-anti-fraud-for-woocommerce' ),
    200200                                'id'      => 'wc_cod_antifraud_settings[api_token]',
    201201                                'default' => '',
    … …  
    204204
    205205                        array(
    206                                 'title'             => __( 'OTP Expiry (minutes)', 'woo-cod-antifraud' ),
    207                                 'desc'              => __( 'Validity duration of the generated OTP code.', 'woo-cod-antifraud' ),
     206                                'title'             => __( 'OTP Expiry (minutes)', 'cod-anti-fraud-for-woocommerce' ),
     207                                'desc'              => __( 'Validity duration of the generated OTP code.', 'cod-anti-fraud-for-woocommerce' ),
    208208                                'id'                => 'wc_cod_antifraud_settings[otp_expiry_minutes]',
    209209                                'default'           => '5',
    … …  
    216216
    217217                        array(
    218                                 'title'             => __( 'Maximum OTP Attempts', 'woo-cod-antifraud' ),
    219                                 'desc'              => __( 'Number of incorrect code attempts allowed before invalidation.', 'woo-cod-antifraud' ),
     218                                'title'             => __( 'Maximum OTP Attempts', 'cod-anti-fraud-for-woocommerce' ),
     219                                'desc'              => __( 'Number of incorrect code attempts allowed before invalidation.', 'cod-anti-fraud-for-woocommerce' ),
    220220                                'id'                => 'wc_cod_antifraud_settings[max_attempts]',
    221221                                'default'           => '3',
    … …  
    228228
    229229                        array(
    230                                 'title'   => __( 'WhatsApp Message Template', 'woo-cod-antifraud' ),
    231                                 'desc'    => __( 'Use {{otp}} as a placeholder for the generated numerical code.', 'woo-cod-antifraud' ),
     230                                'title'   => __( 'WhatsApp Message Template', 'cod-anti-fraud-for-woocommerce' ),
     231                                'desc'    => __( 'Use {{otp}} as a placeholder for the generated numerical code.', 'cod-anti-fraud-for-woocommerce' ),
    232232                                'id'      => 'wc_cod_antifraud_settings[custom_message_template]',
    233                                 'default' => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'woo-cod-antifraud' ),
     233                                'default' => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' ),
    234234                                'type'    => 'textarea',
    235235                        ),
    … …  
    262262        public function save() {
    263263                if ( ! current_user_can( 'manage_woocommerce' ) && ! current_user_can( 'manage_options' ) ) {
    264                         wp_die( esc_html__( 'You do not have permission to modify these settings.', 'woo-cod-antifraud' ) );
     264                        wp_die( esc_html__( 'You do not have permission to modify these settings.', 'cod-anti-fraud-for-woocommerce' ) );
    265265                }
    266266
  • cod-anti-fraud-for-woocommerce/tags/2.0.2/includes/class-wccaf-whatsapp.php

    r3778566 r3798076  
    5757                        return array(
    5858                                'success' => false,
    59                                 'message' => __( 'Invalid phone number for WhatsApp delivery.', 'woo-cod-antifraud' ),
     59                                'message' => __( 'Invalid phone number for WhatsApp delivery.', 'cod-anti-fraud-for-woocommerce' ),
    6060                        );
    6161                }
    … …  
    6767                        return array(
    6868                                'success' => false,
    69                                 'message' => __( 'WhatsApp Gateway not configured. Please enter your API credentials in plugin settings.', 'woo-cod-antifraud' ),
     69                                'message' => __( 'WhatsApp Gateway not configured. Please enter your API credentials in plugin settings.', 'cod-anti-fraud-for-woocommerce' ),
    7070                        );
    7171                }
    … …  
    7373                $template = isset( $settings['custom_message_template'] ) && ! empty( $settings['custom_message_template'] )
    7474                        ? $settings['custom_message_template']
    75                         : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'woo-cod-antifraud' );
     75                        : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' );
    7676
    7777                $message = str_replace( '{{otp}}', $otp, $template );
    … …  
    9191                return array(
    9292                        'success' => false,
    93                         'message' => __( 'Unsupported WhatsApp provider.', 'woo-cod-antifraud' ),
     93                        'message' => __( 'Unsupported WhatsApp provider.', 'cod-anti-fraud-for-woocommerce' ),
    9494                );
    9595        }
    … …  
    131131                        return array(
    132132                                'success' => false,
    133                                 'message' => __( 'Unable to connect to WhatsApp Gateway. Please try again later.', 'woo-cod-antifraud' ),
     133                                'message' => __( 'Unable to connect to WhatsApp Gateway. Please try again later.', 'cod-anti-fraud-for-woocommerce' ),
    134134                        );
    135135                }
    … …  
    142142                        return array(
    143143                                'success'    => true,
    144                                 'message'    => __( 'Code sent! Please check your WhatsApp.', 'woo-cod-antifraud' ),
     144                                'message'    => __( 'Code sent! Please check your WhatsApp.', 'cod-anti-fraud-for-woocommerce' ),
    145145                                'message_id' => isset( $data['messageId'] ) ? sanitize_text_field( $data['messageId'] ) : '',
    146146                        );
    … …  
    153153                return array(
    154154                        'success' => false,
    155                         'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'woo-cod-antifraud' ),
     155                        'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'cod-anti-fraud-for-woocommerce' ),
    156156                );
    157157        }
    … …  
    186186                        return array(
    187187                                'success' => false,
    188                                 'message' => __( 'Unable to connect to WhatsApp provider. Please try again later.', 'woo-cod-antifraud' ),
     188                                'message' => __( 'Unable to connect to WhatsApp provider. Please try again later.', 'cod-anti-fraud-for-woocommerce' ),
    189189                        );
    190190                }
    … …  
    197197                        return array(
    198198                                'success' => true,
    199                                 'message' => __( 'Code sent! Please check your WhatsApp.', 'woo-cod-antifraud' ),
     199                                'message' => __( 'Code sent! Please check your WhatsApp.', 'cod-anti-fraud-for-woocommerce' ),
    200200                        );
    201201                }
    … …  
    207207                return array(
    208208                        'success' => false,
    209                         'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'woo-cod-antifraud' ),
     209                        'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'cod-anti-fraud-for-woocommerce' ),
    210210                );
    211211        }
  • cod-anti-fraud-for-woocommerce/tags/2.0.2/languages/woo-cod-antifraud.pot

    r3769631 r3798076  
    77msgid ""
    88msgstr ""
    9 "Project-Id-Version: COD Anti-Fraud for WooCommerce 2.0.1\n"
     9"Project-Id-Version: COD Anti-Fraud for WooCommerce 2.0.2\n"
    1010"Report-Msgid-Bugs-To: https://beralabs.it\n"
    11 "POT-Creation-Date: 2026-10-25 17:51+0100\n"
     11"POT-Creation-Date: 2026-11-12 11:07+0100\n"
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    … …  
    1818"Content-Transfer-Encoding: 8bit\n"
    1919
    20 #: woo-cod-antifraud.php:129
    21 #, php-format
    22 msgid "WooCommerce COD Anti-Fraud requires %s to be installed and active."
    23 msgstr ""
    24 
    25 #: woo-cod-antifraud.php:168 includes/class-wccaf-whatsapp.php:72
    26 #: includes/class-wccaf-settings.php:236
     20#: includes/class-wccaf-admin.php:46
     21msgid "Settings"
     22msgstr ""
     23
     24#: includes/class-wccaf-admin.php:144 includes/class-wccaf-settings.php:233
     25#: includes/class-wccaf-whatsapp.php:75 woo-cod-antifraud.php:170
    2726msgid ""
    2827"Your verification code for the Cash on Delivery order is: {{otp}}. Valid for "
    … …  
    3029msgstr ""
    3130
    32 #: includes/class-wccaf-otp-manager.php:72
    33 #, php-format
    34 msgid ""
    35 "You have exceeded the maximum number of attempts (%1$d requests). Please try "
    36 "again in %2$d minutes."
    37 msgstr ""
    38 
    39 #: includes/class-wccaf-otp-manager.php:95
    40 #, php-format
    41 msgid "Too many requests from this IP address. Please try again in %d minutes."
    42 msgstr ""
    43 
    44 #: includes/class-wccaf-otp-manager.php:200
    45 msgid "Phone number or OTP code not provided."
    46 msgstr ""
    47 
    48 #: includes/class-wccaf-otp-manager.php:210
    49 msgid "OTP code expired or invalid. Please request a new one."
    50 msgstr ""
    51 
    52 #: includes/class-wccaf-otp-manager.php:224
    53 msgid ""
    54 "Maximum number of incorrect attempts exceeded. Please request a new code."
    55 msgstr ""
    56 
    57 #: includes/class-wccaf-otp-manager.php:238
    58 #: includes/class-wccaf-checkout.php:130 includes/class-wccaf-checkout.php:446
    59 msgid "Number verified successfully!"
    60 msgstr ""
    61 
    62 #: includes/class-wccaf-otp-manager.php:251
    63 #, php-format
    64 msgid "Incorrect OTP code. Attempts remaining: %d"
    65 msgstr ""
    66 
    67 #: includes/class-wccaf-whatsapp.php:56
    68 msgid "Invalid phone number for WhatsApp delivery."
    69 msgstr ""
    70 
    71 #: includes/class-wccaf-whatsapp.php:66
    72 msgid ""
    73 "WhatsApp Gateway not configured. Please enter your API credentials in plugin "
    74 "settings."
    75 msgstr ""
    76 
    77 #: includes/class-wccaf-whatsapp.php:94
    78 msgid "Unsupported WhatsApp provider."
    79 msgstr ""
    80 
    81 #: includes/class-wccaf-whatsapp.php:142 includes/class-wccaf-whatsapp.php:214
    82 #: includes/class-wccaf-checkout.php:405
    83 msgid "Code sent! Please check your WhatsApp."
    84 msgstr ""
    85 
    86 #: includes/class-wccaf-whatsapp.php:159
    87 #, php-format
    88 msgid "Error while sending message via BeraLabs Gateway. Response code: %d"
    89 msgstr ""
    90 
    91 #: includes/class-wccaf-whatsapp.php:222
    92 #, php-format
    93 msgid "Error while sending WhatsApp message. Response code: %d"
    94 msgstr ""
    95 
    96 #: includes/class-wccaf-checkout.php:115 includes/class-wccaf-checkout.php:394
     31#: includes/class-wccaf-admin.php:164
     32msgid "COD & WhatsApp Anti-Fraud Analysis"
     33msgstr ""
     34
     35#: includes/class-wccaf-admin.php:196
     36msgid "This order did not use Cash on Delivery payment method."
     37msgstr ""
     38
     39#: includes/class-wccaf-admin.php:214
     40msgid "WhatsApp Verification Status:"
     41msgstr ""
     42
     43#: includes/class-wccaf-admin.php:216
     44msgid "WHITELISTED CUSTOMER (VIP)"
     45msgstr ""
     46
     47#: includes/class-wccaf-admin.php:218
     48msgid "VERIFIED VIA WHATSAPP"
     49msgstr ""
     50
     51#: includes/class-wccaf-admin.php:220
     52msgid "BYPASSED (BELOW THRESHOLD)"
     53msgstr ""
     54
     55#: includes/class-wccaf-admin.php:222
     56msgid "NOT VERIFIED"
     57msgstr ""
     58
     59#: includes/class-wccaf-admin.php:227
     60msgid "Risk Score:"
     61msgstr ""
     62
     63#: includes/class-wccaf-admin.php:233
     64msgid "Verified Phone Number:"
     65msgstr ""
     66
     67#: includes/class-wccaf-admin.php:240
     68msgid "Verification Date and Time:"
     69msgstr ""
     70
     71#: includes/class-wccaf-checkout.php:115 includes/class-wccaf-checkout.php:529
    9772msgid ""
    9873"WhatsApp Gateway not configured. Please enter API credentials in plugin "
    … …  
    10075msgstr ""
    10176
    102 #: includes/class-wccaf-checkout.php:117 includes/class-wccaf-checkout.php:360
     77#: includes/class-wccaf-checkout.php:117 includes/class-wccaf-checkout.php:482
    10378msgid "Please enter your phone number in the billing form first."
    10479msgstr ""
    … …  
    11287msgstr ""
    11388
    114 #: includes/class-wccaf-checkout.php:120 includes/class-wccaf-checkout.php:289
     89#: includes/class-wccaf-checkout.php:120 includes/class-wccaf-checkout.php:293
    11590msgid "Resend WhatsApp Code"
    11691msgstr ""
    … …  
    152127msgstr ""
    153128
     129#: includes/class-wccaf-checkout.php:130 includes/class-wccaf-checkout.php:600
     130#: includes/class-wccaf-otp-manager.php:339
     131msgid "Number verified successfully!"
     132msgstr ""
     133
    154134#: includes/class-wccaf-checkout.php:159
    155135msgid "Cash on Delivery verification after order confirmation"
    … …  
    176156msgstr ""
    177157
    178 #: includes/class-wccaf-checkout.php:190 includes/class-wccaf-checkout.php:295
     158#: includes/class-wccaf-checkout.php:190 includes/class-wccaf-checkout.php:299
    179159msgid "OTP Code (6 digits)"
    180160msgstr ""
    181161
    182 #: includes/class-wccaf-checkout.php:192 includes/class-wccaf-checkout.php:297
     162#: includes/class-wccaf-checkout.php:192 includes/class-wccaf-checkout.php:302
    183163msgid "Verify Code"
    184164msgstr ""
    185165
    186 #: includes/class-wccaf-checkout.php:239
     166#: includes/class-wccaf-checkout.php:243
    187167msgid "Cash on Delivery WhatsApp Verification"
    188168msgstr ""
    189169
    190 #: includes/class-wccaf-checkout.php:244
     170#: includes/class-wccaf-checkout.php:248
    191171msgid "Trusted Customer (Whitelist)"
    192172msgstr ""
    193173
    194 #: includes/class-wccaf-checkout.php:250
     174#: includes/class-wccaf-checkout.php:254
    195175#, php-format
    196176msgid ""
    … …  
    198178msgstr ""
    199179
    200 #: includes/class-wccaf-checkout.php:260
     180#: includes/class-wccaf-checkout.php:264
    201181msgid "Number Verified via WhatsApp OTP"
    202182msgstr ""
    203183
    204 #: includes/class-wccaf-checkout.php:266
     184#: includes/class-wccaf-checkout.php:270
    205185#, php-format
    206186msgid "Order #%1$d has passed WhatsApp verification for phone number %2$s."
    207187msgstr ""
    208188
    209 #: includes/class-wccaf-checkout.php:280
     189#: includes/class-wccaf-checkout.php:284
    210190#, php-format
    211191msgid "Enter the OTP code sent via WhatsApp to %s to confirm verification."
    212192msgstr ""
    213193
    214 #: includes/class-wccaf-checkout.php:319
     194#: includes/class-wccaf-checkout.php:324
     195msgid "WooCommerce is not available."
     196msgstr ""
     197
     198#: includes/class-wccaf-checkout.php:332
     199msgid "Invalid order specified."
     200msgstr ""
     201
     202#: includes/class-wccaf-checkout.php:339
     203msgid "The specified order does not use Cash on Delivery."
     204msgstr ""
     205
     206#: includes/class-wccaf-checkout.php:370
     207msgid "Permission denied or invalid order verification key."
     208msgstr ""
     209
     210#: includes/class-wccaf-checkout.php:384
     211msgid ""
     212"The verified phone number does not match the billing phone number of this "
     213"order."
     214msgstr ""
     215
     216#: includes/class-wccaf-checkout.php:408
    215217msgid "Cash on Delivery payment is not available for this address."
    216218msgstr ""
    217219
    218 #: includes/class-wccaf-checkout.php:326
     220#: includes/class-wccaf-checkout.php:415
    219221msgid "VIP/Trusted customer: OTP verification not required."
    220222msgstr ""
    221223
    222 #: includes/class-wccaf-checkout.php:367
     224#: includes/class-wccaf-checkout.php:453
     225msgid "Order is already verified."
     226msgstr ""
     227
     228#: includes/class-wccaf-checkout.php:489
    223229msgid ""
    224230"Cash on Delivery is not authorized for this contact. Please select another "
    … …  
    226232msgstr ""
    227233
    228 #: includes/class-wccaf-checkout.php:380
     234#: includes/class-wccaf-checkout.php:515
    229235msgid "Phone number verified automatically (Trusted Whitelist Customer)."
    230236msgstr ""
    231237
    232 #: includes/class-wccaf-checkout.php:426
     238#: includes/class-wccaf-checkout.php:541 includes/class-wccaf-whatsapp.php:144
     239#: includes/class-wccaf-whatsapp.php:199
     240msgid "Code sent! Please check your WhatsApp."
     241msgstr ""
     242
     243#: includes/class-wccaf-checkout.php:544 includes/class-wccaf-whatsapp.php:155
     244#: includes/class-wccaf-whatsapp.php:209
     245msgid ""
     246"Could not deliver WhatsApp verification code. Please check your phone number "
     247"and try again."
     248msgstr ""
     249
     250#: includes/class-wccaf-checkout.php:580
    233251msgid "Missing or invalid phone number."
    234252msgstr ""
    235253
    236 #: includes/class-wccaf-checkout.php:430
     254#: includes/class-wccaf-checkout.php:584
    237255msgid "Please enter a valid 6-digit OTP code."
    238256msgstr ""
    239257
    240 #: includes/class-wccaf-checkout.php:479 includes/class-wccaf-checkout.php:554
    241 #: includes/class-wccaf-checkout.php:628
     258#: includes/class-wccaf-checkout.php:638 includes/class-wccaf-checkout.php:718
     259#: includes/class-wccaf-checkout.php:797
    242260msgid ""
    243261"Cash on Delivery is not available for this order. Please choose an "
    … …  
    245263msgstr ""
    246264
    247 #: includes/class-wccaf-checkout.php:493 includes/class-wccaf-checkout.php:568
    248 #: includes/class-wccaf-checkout.php:641
     265#: includes/class-wccaf-checkout.php:652 includes/class-wccaf-checkout.php:732
     266#: includes/class-wccaf-checkout.php:810
    249267#, php-format
    250268msgid ""
    … …  
    253271msgstr ""
    254272
    255 #: includes/class-wccaf-checkout.php:509 includes/class-wccaf-checkout.php:582
    256 #: includes/class-wccaf-checkout.php:654
     273#: includes/class-wccaf-checkout.php:668 includes/class-wccaf-checkout.php:746
     274#: includes/class-wccaf-checkout.php:823
    257275msgid ""
    258276"Please enter your phone number in the billing form first for Cash on "
    … …  
    260278msgstr ""
    261279
    262 #: includes/class-wccaf-checkout.php:530 includes/class-wccaf-checkout.php:601
    263 #: includes/class-wccaf-checkout.php:672
     280#: includes/class-wccaf-checkout.php:691 includes/class-wccaf-checkout.php:767
     281#: includes/class-wccaf-checkout.php:841
    264282msgid ""
    265283"WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. "
    … …  
    268286msgstr ""
    269287
    270 #: includes/class-wccaf-admin.php:96
    271 msgid "COD & WhatsApp Anti-Fraud Analysis"
    272 msgstr ""
    273 
    274 #: includes/class-wccaf-admin.php:127
    275 msgid "This order did not use Cash on Delivery payment method."
    276 msgstr ""
    277 
    278 #: includes/class-wccaf-admin.php:145
    279 msgid "WhatsApp Verification Status:"
    280 msgstr ""
    281 
    282 #: includes/class-wccaf-admin.php:147
    283 msgid "WHITELISTED CUSTOMER (VIP)"
    284 msgstr ""
    285 
    286 #: includes/class-wccaf-admin.php:149
    287 msgid "VERIFIED VIA WHATSAPP"
    288 msgstr ""
    289 
    290 #: includes/class-wccaf-admin.php:151
    291 msgid "BYPASSED (BELOW THRESHOLD)"
    292 msgstr ""
    293 
    294 #: includes/class-wccaf-admin.php:153
    295 msgid "NOT VERIFIED"
    296 msgstr ""
    297 
    298 #: includes/class-wccaf-admin.php:158
    299 msgid "Risk Score:"
    300 msgstr ""
    301 
    302 #: includes/class-wccaf-admin.php:164
    303 msgid "Verified Phone Number:"
    304 msgstr ""
    305 
    306 #: includes/class-wccaf-admin.php:171
    307 msgid "Verification Date and Time:"
     288#: includes/class-wccaf-checkout.php:869
     289msgid ""
     290"Cash on Delivery order cannot be placed without completing WhatsApp OTP "
     291"phone verification."
     292msgstr ""
     293
     294#: includes/class-wccaf-otp-manager.php:113
     295#, php-format
     296msgid ""
     297"You have exceeded the maximum number of attempts (%1$d requests). Please try "
     298"again in %2$d minutes."
     299msgstr ""
     300
     301#: includes/class-wccaf-otp-manager.php:136
     302#, php-format
     303msgid "Too many requests from this IP address. Please try again in %d minutes."
     304msgstr ""
     305
     306#: includes/class-wccaf-otp-manager.php:255
     307msgid "Phone number or OTP code not provided."
     308msgstr ""
     309
     310#: includes/class-wccaf-otp-manager.php:273
     311msgid "OTP code expired or invalid. Please request a new one."
     312msgstr ""
     313
     314#: includes/class-wccaf-otp-manager.php:291
     315msgid "OTP code expired. Please request a new one."
     316msgstr ""
     317
     318#: includes/class-wccaf-otp-manager.php:305
     319#: includes/class-wccaf-otp-manager.php:352
     320msgid ""
     321"Maximum number of incorrect attempts exceeded. Please request a new code."
     322msgstr ""
     323
     324#: includes/class-wccaf-otp-manager.php:366
     325#, php-format
     326msgid "Incorrect OTP code. Attempts remaining: %d"
    308327msgstr ""
    309328
    … …  
    316335msgstr ""
    317336
    318 #: includes/class-wccaf-settings.php:53
     337#: includes/class-wccaf-settings.php:50
    319338msgid "WooCommerce COD Anti-Fraud Settings"
    320339msgstr ""
    321340
    322 #: includes/class-wccaf-settings.php:55
     341#: includes/class-wccaf-settings.php:52
    323342msgid ""
    324343"Configure WhatsApp OTP verification and risk score management for Cash on "
    … …  
    327346msgstr ""
    328347
    329 #: includes/class-wccaf-settings.php:60
     348#: includes/class-wccaf-settings.php:57
    330349msgid "OTP Verification Mode (Pre-Checkout Blocking)"
    331350msgstr ""
    332351
    333 #: includes/class-wccaf-settings.php:61
     352#: includes/class-wccaf-settings.php:58
    334353msgid ""
    335354"WhatsApp OTP verification occurs directly in cart/checkout before placing "
    … …  
    337356msgstr ""
    338357
    339 #: includes/class-wccaf-settings.php:66
     358#: includes/class-wccaf-settings.php:63
    340359msgid "Always Required (All Cash on Delivery Orders)"
    341360msgstr ""
    342361
    343 #: includes/class-wccaf-settings.php:67
     362#: includes/class-wccaf-settings.php:64
    344363msgid "Conditional (Based on Risk Score or Cart Total)"
    345364msgstr ""
    346365
    347 #: includes/class-wccaf-settings.php:72
     366#: includes/class-wccaf-settings.php:69
    348367msgid "Risk Score Threshold (0-100)"
    349368msgstr ""
    350369
    351 #: includes/class-wccaf-settings.php:73
     370#: includes/class-wccaf-settings.php:70
    352371msgid ""
    353372"Require OTP if calculated risk score exceeds this value (only applied in "
    … …  
    355374msgstr ""
    356375
    357 #: includes/class-wccaf-settings.php:85
     376#: includes/class-wccaf-settings.php:82
    358377msgid "Minimum Cart Amount for OTP (€)"
    359378msgstr ""
    360379
    361 #: includes/class-wccaf-settings.php:86
     380#: includes/class-wccaf-settings.php:83
    362381msgid ""
    363382"Require OTP only if cart total equals or exceeds this amount (0 for no "
    … …  
    365384msgstr ""
    366385
    367 #: includes/class-wccaf-settings.php:97
     386#: includes/class-wccaf-settings.php:94
    368387msgid "Maximum COD Cart Threshold (€)"
    369388msgstr ""
    370389
    371 #: includes/class-wccaf-settings.php:98
     390#: includes/class-wccaf-settings.php:95
    372391msgid "Maximum cart value above which the high-threshold rule is applied."
    373392msgstr ""
    374393
    375 #: includes/class-wccaf-settings.php:109
     394#: includes/class-wccaf-settings.php:106
    376395msgid "Action Above Maximum Threshold"
    377396msgstr ""
    378397
    379 #: includes/class-wccaf-settings.php:110
     398#: includes/class-wccaf-settings.php:107
    380399msgid "Action to take when cart total exceeds the maximum threshold."
    381400msgstr ""
    382401
    383 #: includes/class-wccaf-settings.php:115
     402#: includes/class-wccaf-settings.php:112
    384403msgid "Require WhatsApp OTP Verification"
    385404msgstr ""
    386405
    387 #: includes/class-wccaf-settings.php:116
     406#: includes/class-wccaf-settings.php:113
    388407msgid "Disable Cash on Delivery Payment Method"
    389408msgstr ""
    390409
    391 #: includes/class-wccaf-settings.php:121
     410#: includes/class-wccaf-settings.php:118
    392411msgid "Phone / Email Blacklist"
    393412msgstr ""
    394413
    395 #: includes/class-wccaf-settings.php:122
     414#: includes/class-wccaf-settings.php:119
    396415msgid ""
    397416"Enter phone numbers or emails to block from Cash on Delivery (one per line "
    … …  
    399418msgstr ""
    400419
    401 #: includes/class-wccaf-settings.php:130
     420#: includes/class-wccaf-settings.php:127
    402421msgid "Phone / Email Whitelist (VIP)"
    403422msgstr ""
    404423
    405 #: includes/class-wccaf-settings.php:131
     424#: includes/class-wccaf-settings.php:128
    406425msgid ""
    407426"Enter trusted phone numbers or emails to automatically bypass OTP "
    … …  
    409428msgstr ""
    410429
    411 #: includes/class-wccaf-settings.php:139
     430#: includes/class-wccaf-settings.php:136
    412431msgid "Max OTP Requests Limit"
    413432msgstr ""
    414433
    415 #: includes/class-wccaf-settings.php:140
     434#: includes/class-wccaf-settings.php:137
    416435msgid "Maximum number of OTP requests allowed before temporary lock."
    417436msgstr ""
    418437
    419 #: includes/class-wccaf-settings.php:151
     438#: includes/class-wccaf-settings.php:148
    420439msgid "Rate Limit Window (minutes)"
    421440msgstr ""
    422441
    423 #: includes/class-wccaf-settings.php:152
     442#: includes/class-wccaf-settings.php:149
    424443msgid "Validity period for request limit in minutes."
    425444msgstr ""
    426445
    427 #: includes/class-wccaf-settings.php:163
     446#: includes/class-wccaf-settings.php:160
    428447msgid "WhatsApp Provider"
    429448msgstr ""
    430449
    431 #: includes/class-wccaf-settings.php:164
     450#: includes/class-wccaf-settings.php:161
    432451msgid "Select the WhatsApp provider for sending OTP codes."
    433452msgstr ""
    434453
    435 #: includes/class-wccaf-settings.php:169
     454#: includes/class-wccaf-settings.php:166
    436455msgid "BeraLabs Gateway (Proprietary)"
    437456msgstr ""
    438457
    439 #: includes/class-wccaf-settings.php:170
     458#: includes/class-wccaf-settings.php:167
    440459msgid "UltraMsg API"
    441460msgstr ""
    442461
    443 #: includes/class-wccaf-settings.php:175
     462#: includes/class-wccaf-settings.php:172
    444463msgid "BeraLabs Gateway Endpoint"
    445464msgstr ""
    446465
    447 #: includes/class-wccaf-settings.php:176
     466#: includes/class-wccaf-settings.php:173
    448467msgid ""
    449468"Endpoint URL for BeraLabs WhatsApp OTP microservice (e.g., https://"
    … …  
    451470msgstr ""
    452471
    453 #: includes/class-wccaf-settings.php:184
     472#: includes/class-wccaf-settings.php:181
    454473msgid "BeraLabs API Key"
    455474msgstr ""
    456475
    457 #: includes/class-wccaf-settings.php:185
     476#: includes/class-wccaf-settings.php:182
    458477msgid ""
    459478"Enter the secret API key (x-api-key) for authentication with BeraLabs "
    … …  
    461480msgstr ""
    462481
    463 #: includes/class-wccaf-settings.php:185
     482#: includes/class-wccaf-settings.php:182
    464483msgid "Request WhatsApp API Key"
    465484msgstr ""
    466485
    467 #: includes/class-wccaf-settings.php:193
     486#: includes/class-wccaf-settings.php:190
    468487msgid "UltraMsg Instance ID"
    469488msgstr ""
    470489
    471 #: includes/class-wccaf-settings.php:194
     490#: includes/class-wccaf-settings.php:191
    472491msgid ""
    473492"Enter the Instance ID provided by UltraMsg (e.g., instance12345). Only used "
    … …  
    475494msgstr ""
    476495
    477 #: includes/class-wccaf-settings.php:201
     496#: includes/class-wccaf-settings.php:198
    478497msgid "UltraMsg API Token"
    479498msgstr ""
    480499
    481 #: includes/class-wccaf-settings.php:202
     500#: includes/class-wccaf-settings.php:199
    482501msgid ""
    483502"Enter the secret API Token provided by UltraMsg. Only used if UltraMsg "
    … …  
    485504msgstr ""
    486505
    487 #: includes/class-wccaf-settings.php:209
     506#: includes/class-wccaf-settings.php:206
    488507msgid "OTP Expiry (minutes)"
    489508msgstr ""
    490509
    491 #: includes/class-wccaf-settings.php:210
     510#: includes/class-wccaf-settings.php:207
    492511msgid "Validity duration of the generated OTP code."
    493512msgstr ""
    494513
    495 #: includes/class-wccaf-settings.php:221
     514#: includes/class-wccaf-settings.php:218
    496515msgid "Maximum OTP Attempts"
    497516msgstr ""
    498517
    499 #: includes/class-wccaf-settings.php:222
     518#: includes/class-wccaf-settings.php:219
    500519msgid "Number of incorrect code attempts allowed before invalidation."
    501520msgstr ""
    502521
    503 #: includes/class-wccaf-settings.php:233
     522#: includes/class-wccaf-settings.php:230
    504523msgid "WhatsApp Message Template"
    505524msgstr ""
    506525
    507 #: includes/class-wccaf-settings.php:234
     526#: includes/class-wccaf-settings.php:231
    508527msgid "Use {{otp}} as a placeholder for the generated numerical code."
    509528msgstr ""
     529
     530#: includes/class-wccaf-settings.php:264
     531msgid "You do not have permission to modify these settings."
     532msgstr ""
     533
     534#: includes/class-wccaf-whatsapp.php:59
     535msgid "Invalid phone number for WhatsApp delivery."
     536msgstr ""
     537
     538#: includes/class-wccaf-whatsapp.php:69
     539msgid ""
     540"WhatsApp Gateway not configured. Please enter your API credentials in plugin "
     541"settings."
     542msgstr ""
     543
     544#: includes/class-wccaf-whatsapp.php:93
     545msgid "Unsupported WhatsApp provider."
     546msgstr ""
     547
     548#: includes/class-wccaf-whatsapp.php:133
     549msgid "Unable to connect to WhatsApp Gateway. Please try again later."
     550msgstr ""
     551
     552#: includes/class-wccaf-whatsapp.php:188
     553msgid "Unable to connect to WhatsApp provider. Please try again later."
     554msgstr ""
     555
     556#: woo-cod-antifraud.php:131
     557#, php-format
     558msgid "WooCommerce COD Anti-Fraud requires %s to be installed and active."
     559msgstr ""
  • cod-anti-fraud-for-woocommerce/tags/2.0.2/readme.txt

    r3778566 r3798076  
    22Contributors: beralabs
    33Donate link: https://beralabs.it
    4 Tags: woocommerce, cash on delivery, anti fraud, otp, whatsapp
     4Tags: nachnahme, contra reembolso, cash on delivery, anti fraud, woocommerce
    55Requires at least: 6.0
    66Tested up to: 7.1
    … …  
    2828* **Order Meta & Admin Details:** Transparent risk scores and verification timestamps displayed directly inside WooCommerce order details.
    2929* **PHP 8.x & HPOS Certified:** Fully compatible and tested with PHP 8.0-8.3 and WooCommerce High-Performance Order Storage (HPOS).
     30* **Multi-language & Internationalization (i18n):** Native support for French (France, Belgique, Suisse, Maghreb - fr_FR), German (Deutschland, Österreich, Schweiz - de_DE), Spanish (España y Latinoamérica - es_ES), Italian (it_IT), and English (en_US / en_GB).
     31
     32---
     33
     34### Descripción en Español (Pago Contra Reembolso & Contra Entrega)
     35
     36**COD Anti-Fraud for WooCommerce** es la solución definitiva de prevención de fraude y verificación para tiendas online que ofrecen **pago contra reembolso** (España) o **pago contra entrega** (México, Colombia, Chile, Perú, Argentina y Latinoamérica).
     37
     38El pago contra reembolso suele sufrir altas tasas de rechazo, paquetes devueltos no reclamados, pedidos falsos y pérdidas logísticas elevadas. Este plugin elimina estos problemas validando la autenticidad del cliente antes de confirmar el pedido mediante **verificación OTP por WhatsApp** y un **motor de evaluación de riesgo**.
     39
     40#### Características Principales en Español:
     41* **Verificación OTP por WhatsApp:** Envía automáticamente un código numérico de 6 dígitos al teléfono móvil del comprador vía WhatsApp. El cliente debe validar el código en el checkout antes de poder completar el pedido contra entrega.
     42* **Motor Antifraude Inteligente:** Calcula una puntuación de riesgo (0-100) analizando compras previas canceladas o devueltas, pedidos como invitado y valor del carrito.
     43* **Bloqueo Pre-Checkout Infranqueable:** Protección bidireccional (frontend y backend) que impide finalizar pedidos contra reembolso sin confirmación telefónica válida.
     44* **Umbrales Máximos y Reglas de Importe:** Define importes mínimos o máximos para permitir el pago contra reembolso y desactívalo o exige OTP cuando el carrito supere el límite deseado.
     45* **Gestión de Listas Negras y Listas Blancas (VIP):** Bloquea automáticamente números de teléfono o correos sospechosos y exime de verificación a clientes recurrentes de máxima confianza.
     46* **Prevención de Abusos y Rate Limiting:** Limita los intentos y las solicitudes por dirección IP y teléfono para evitar costes innecesarios de mensajería y ataques de fuerza bruta.
     47* **Integración con Pasarelas WhatsApp:** Compatible de forma nativa con UltraMsg y BeraLab WhatsApp Gateway, fácilmente ampliable a otras APIs.
     48* **Totalmente Localizado en Español:** Interfaz de usuario en el checkout y panel de administración 100% traducidos al español (es_ES / es_419).
     49
     50---
     51
     52### Deutsche Beschreibung (Nachnahme & Betrugsschutz für WooCommerce)
     53
     54**COD Anti-Fraud for WooCommerce** ist die professionelle Lösung zur **Betrugsprävention** und Reduzierung von Annahmeverweigerungen für Online-Shops im DACH-Raum (Deutschland, Österreich, Schweiz), die **Nachnahme** als Zahlungsmethode anbieten.
     55
     56Der Kauf per Nachnahme birgt für Händler erhebliche finanzielle Risiken: Unzustellbare Sendungen, Spaßbestellungen, unvollständige Adressen und hohe Kosten für Rücksendungen belasten die Marge empfindlich. Dieses Plugin bietet effektiven **Betrugsschutz für WooCommerce**, indem es betrügerische Bestellungen vorab filtert, Händlern hilft, die **Retourenquote reduzieren** zu können, und eine nahtlose **OTP-Verifizierung via WhatsApp & SMS** direkt im Kassenbereich (Pre-Checkout) erzwingt.
     57
     58#### Wichtige Funktionen für den DACH-Markt:
     59* **Nachnahme absichern:** Schützen Sie Ihren Shop vor unüberlegten oder böswilligen Nachnahme-Bestellungen und minimieren Sie logistische Ausfallkosten.
     60* **Retourenquote reduzieren:** Durch die Echtzeit-Verifizierung der Mobilfunknummer sinken unzustellbare Pakete und Retouren drastisch (um bis zu 85 %).
     61* **OTP-Verifizierung via WhatsApp & SMS:** Der Kunde erhält direkt beim Checkout einen 6-stelligen Verifizierungscode per WhatsApp. Ohne gültige Bestätigung kann die Nachnahme-Bestellung nicht abgeschlossen werden.
     62* **Nachnahmegebühr & Schwellenwerte:** Schützen Sie sich vor hohen Nachnahmegebühren und logistischen Verlusten durch konfigurierbare Mindest- und Höchstbeträge im Warenkorb.
     63* **Intelligente Risikobewertung (0-100):** Analysiert Gastbestellungen, frühere Stornierungen und Warenkorbwerte zur automatischen Risikobewertung.
     64* **Sperrliste & VIP-Kunden (Blacklist/Whitelist):** Blockieren Sie verdächtige Rufnummern oder E-Mails und befreien Sie verifizierte Stammkunden von wiederholten Prüfungen.
     65* **DSGVO-freundlich & HPOS-zertifiziert:** Vollständige Unterstützung für WooCommerce High-Performance Order Storage (HPOS) und modernste PHP 8.x-Laufzeiten.
     66* **Vollständige deutsche Lokalisierung:** Sowohl das Checkout-Frontend als auch das gesamte Admin-Dashboard sind in fehlerfreiem Deutsch (de_DE) verfügbar.
     67
     68---
     69
     70### Description en Français (Paiement à la Livraison & Contre-Remboursement WooCommerce)
     71
     72**COD Anti-Fraud for WooCommerce** est la solution de référence pour la prévention de la fraude et la sécurisation des boutiques en ligne proposant le **paiement à la livraison** (France, Belgique, Suisse et Maghreb : Maroc, Algérie, Tunisie).
     73
     74Le paiement à la livraison (COD) engendre fréquemment des commandes fantômes, des adresses erronées et un **taux de retour colis** critique qui grève la rentabilité logistique des e-commerçants. Ce plugin d'**anti-fraude e-commerce** protège vos marges en introduisant une **vérification commande WhatsApp** par code OTP bloquante au panier et au checkout, ainsi qu'un calcul dynamique du risque d'impayé.
     75
     76#### Fonctionnalités Clés pour le Marché Francophone :
     77* **Vérification Commande WhatsApp par OTP :** Envoi instantané d'un code de validation à 6 chiffres sur le WhatsApp du client avant la validation du paiement.
     78* **Sécurisation du Contre-Remboursement WooCommerce :** Bloque les commandes suspectes et empêche la finalisation d'un panier en contre-remboursement sans validation mobile préalable.
     79* **Gestion des Frais de Contre-Remboursement & Seuils :** Définissez des paniers minimum et maximum pour amortir ou compenser les **frais de contre-remboursement** et désactivez automatiquement le COD sur les commandes à haut risque.
     80* **Réduction Drastique du Taux de Retour Colis :** Élimine jusqu'à 85 % des colis refusés ou non réclamés à la livraison grâce à la confirmation téléphonique active de l'acheteur.
     81* **Moteur d'Évaluation des Risques (0-100) :** Analyse l'historique d'annulation, les commandes en mode invité et le montant du panier pour isoler les profils frauduleux.
     82* **Gestion des Listes Noires et Listes Blanches (VIP) :** Bannissez les numéros et e-mails récidivistes, tout en exemptant vos clients fidèles de la vérification OTP.
     83* **Haute Compatibilité HPOS & PHP 8.x :** Certifié compatible avec WooCommerce High-Performance Order Storage (HPOS) et PHP 7.4 à 8.3+.
     84* **Traduction Complète en Français (fr_FR) :** Interface client fluide au checkout et panneau d'administration traduits à 100 % en français pour un parcours utilisateur sans friction.
    3085
    3186== External Services ==
    … …  
    68123Yes, guest checkout is fully supported and analyzed with higher risk evaluation weights.
    69124
     125= ¿Cómo reduce este plugin las devoluciones en pago contra reembolso / contra entrega? =
     126Al exigir que el cliente verifique su número de teléfono mediante un código OTP recibido en su cuenta de WhatsApp activa en tiempo real, se filtran de raíz los números de teléfono falsos, compras impulsivas que luego no se recogen y direcciones fraudulentas. Esto reduce las entregas fallidas hasta en un 85%.
     127
     128= ¿Está disponible en idioma español? =
     129Sí, el plugin incluye traducciones nativas y completas en español (es_ES) tanto para los mensajes y botones mostrados al cliente en la pantalla de pago (checkout) como para todo el panel de control y configuración del comerciante.
     130
     131= Wie hilft dieses Plugin, die Retourenquote bei Nachnahme zu reduzieren? =
     132Durch die verpflichtende OTP-Verifizierung via WhatsApp & SMS vor dem Kaufabschluss werden gefälschte Adressen und Spaßbestellungen zuverlässig eliminiert. Händler im DACH-Raum können so ihre Retourenquote reduzieren und unnötige Nachnahmegebühr-Verluste sowie Rückversandkosten effektiv vermeiden.
     133
     134= Ist das Plugin vollständig auf Deutsch verfügbar? =
     135Ja, das Plugin enthält eine vollständige und professionelle Lokalisierung auf Deutsch (de_DE) für das Kassen-Frontend sowie für alle Menüs und Optionen im WooCommerce-Adminbereich.
     136
    70137== Screenshots ==
    71138
    … …  
    82149* Enhancement: Protezione da brute force e rate limiting transazionale su Transient per le richieste OTP WhatsApp.
    83150* Improvement: Piena conformità WooCommerce HPOS (High-Performance Order Storage) e capability check 'manage_woocommerce' nell'admin backend.
     151* Localization: Obiettivo strategico OBJ-08 completato - Internazionalizzazione completa con supporto per lingua spagnola (es_ES / LatAm), generazione template POT aggiornato, catalogo PO/MO compilato e allineamento formale text-domain standard.
    84152
    85153= 2.0.1 =
    … …  
    109177== Upgrade Notice ==
    110178
     179= 2.0.2 =
     180Recommended upgrade: complete Spanish/LatAm localization (OBJ-08), IDOR prevention, HPOS certified compatibility, and transactional rate limiting.
     181
    111182= 2.0.1 =
    112183Recommended upgrade for all users: adds WhatsApp OTP checkout flow, strict anti-bypass validation, UX optimizations, certified HPOS compatibility, and passed E2E test validations.
  • cod-anti-fraud-for-woocommerce/tags/2.0.2/woo-cod-antifraud.php

    r3778566 r3798076  
    77 * Author: BeraLab
    88 * Author URI: https://beralabs.it
    9  * Text Domain: woo-cod-antifraud
     9 * Text Domain: cod-anti-fraud-for-woocommerce
    1010 * Domain Path: /languages
    1111 * Requires at least: 6.0
    … …  
    9292                // Load Translations
    9393                // phpcs:ignore PluginCheck.CodeAnalysis.DiscouragedFunctions.load_plugin_textdomainFound
    94                 load_plugin_textdomain( 'woo-cod-antifraud', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
     94                load_plugin_textdomain( 'cod-anti-fraud-for-woocommerce', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
    9595
    9696                // Include internal components
    … …  
    129129                                sprintf(
    130130                                        /* translators: %s: WooCommerce plugin link */
    131                                         __( 'WooCommerce COD Anti-Fraud requires %s to be installed and active.', 'woo-cod-antifraud' ),
     131                                        __( 'WooCommerce COD Anti-Fraud requires %s to be installed and active.', 'cod-anti-fraud-for-woocommerce' ),
    132132                                        '<a href="https://wordpress.org/plugins/woocommerce/" target="_blank" rel="noopener noreferrer">WooCommerce</a>'
    133133                                ),
    … …  
    168168                                'otp_expiry_minutes'       => 5,
    169169                                'max_attempts'             => 3,
    170                                 'custom_message_template'  => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'woo-cod-antifraud' ),
     170                                'custom_message_template'  => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' ),
    171171                        );
    172172                        update_option( 'wc_cod_antifraud_settings', $defaults );
  • cod-anti-fraud-for-woocommerce/trunk/includes/class-wccaf-admin.php

    r3778566 r3798076  
    4444                        '<a href="%s">%s</a>',
    4545                        esc_url( $settings_url ),
    46                         esc_html__( 'Settings', 'woo-cod-antifraud' )
     46                        esc_html__( 'Settings', 'cod-anti-fraud-for-woocommerce' )
    4747                );
    4848                array_unshift( $links, $settings_link );
    … …  
    142142
    143143                $custom_message                    = isset( $input['custom_message_template'] ) ? sanitize_textarea_field( $input['custom_message_template'] ) : '';
    144                 $output['custom_message_template'] = ! empty( $custom_message ) ? $custom_message : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'woo-cod-antifraud' );
     144                $output['custom_message_template'] = ! empty( $custom_message ) ? $custom_message : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' );
    145145
    146146                return $output;
    … …  
    162162                        add_meta_box(
    163163                                'wccaf_order_meta_box',
    164                                 esc_html__( 'COD & WhatsApp Anti-Fraud Analysis', 'woo-cod-antifraud' ),
     164                                esc_html__( 'COD & WhatsApp Anti-Fraud Analysis', 'cod-anti-fraud-for-woocommerce' ),
    165165                                array( $this, 'render_order_meta_box' ),
    166166                                $screen,
    … …  
    194194                if ( 'cod' !== $order->get_payment_method() ) {
    195195                        ?>
    196                         <p><?php esc_html_e( 'This order did not use Cash on Delivery payment method.', 'woo-cod-antifraud' ); ?></p>
     196                        <p><?php esc_html_e( 'This order did not use Cash on Delivery payment method.', 'cod-anti-fraud-for-woocommerce' ); ?></p>
    197197                        <?php
    198198                        return;
    … …  
    212212                <div style="font-size:14px; line-height:1.6;">
    213213                        <p>
    214                                 <strong><?php esc_html_e( 'WhatsApp Verification Status:', 'woo-cod-antifraud' ); ?></strong><br>
     214                                <strong><?php esc_html_e( 'WhatsApp Verification Status:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br>
    215215                                <?php if ( 'yes' === $whitelisted ) : ?>
    216                                         <span style="color:#fff; background:#0275d8; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'WHITELISTED CUSTOMER (VIP)', 'woo-cod-antifraud' ); ?></span>
     216                                        <span style="color:#fff; background:#0275d8; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'WHITELISTED CUSTOMER (VIP)', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    217217                                <?php elseif ( 'yes' === $verified ) : ?>
    218                                         <span style="color:#fff; background:#5cb85c; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'VERIFIED VIA WHATSAPP', 'woo-cod-antifraud' ); ?></span>
     218                                        <span style="color:#fff; background:#5cb85c; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'VERIFIED VIA WHATSAPP', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    219219                                <?php elseif ( 'no' === $otp_required ) : ?>
    220                                         <span style="color:#333; background:#e0e0e0; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'BYPASSED (BELOW THRESHOLD)', 'woo-cod-antifraud' ); ?></span>
     220                                        <span style="color:#333; background:#e0e0e0; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'BYPASSED (BELOW THRESHOLD)', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    221221                                <?php else : ?>
    222                                         <span style="color:#fff; background:#d9534f; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'NOT VERIFIED', 'woo-cod-antifraud' ); ?></span>
     222                                        <span style="color:#fff; background:#d9534f; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'NOT VERIFIED', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    223223                                <?php endif; ?>
    224224                        </p>
    225225
    226226                        <p>
    227                                 <strong><?php esc_html_e( 'Risk Score:', 'woo-cod-antifraud' ); ?></strong><br>
     227                                <strong><?php esc_html_e( 'Risk Score:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br>
    228228                                <span style="background:<?php echo esc_attr( $badge_color ); ?>; color:#fff; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php echo esc_html( (string) $score_val ); ?> / 100</span>
    229229                        </p>
    … …  
    231231                        <?php if ( $phone ) : ?>
    232232                                <p>
    233                                         <strong><?php esc_html_e( 'Verified Phone Number:', 'woo-cod-antifraud' ); ?></strong><br>
     233                                        <strong><?php esc_html_e( 'Verified Phone Number:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br>
    234234                                        <code><?php echo esc_html( (string) $phone ); ?></code>
    235235                                </p>
    … …  
    238238                        <?php if ( $timestamp ) : ?>
    239239                                <p>
    240                                         <strong><?php esc_html_e( 'Verification Date and Time:', 'woo-cod-antifraud' ); ?></strong><br>
     240                                        <strong><?php esc_html_e( 'Verification Date and Time:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br>
    241241                                        <small><?php echo esc_html( (string) $timestamp ); ?></small>
    242242                                </p>
  • cod-anti-fraud-for-woocommerce/trunk/includes/class-wccaf-checkout.php

    r3778566 r3798076  
    113113                                'max_cart_action'     => $max_action,
    114114                                'verification_timing' => $verification_timing,
    115                                 'not_configured_msg'  => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', 'woo-cod-antifraud' ),
     115                                'not_configured_msg'  => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', 'cod-anti-fraud-for-woocommerce' ),
    116116                                'i18n'                => array(
    117                                         'enter_phone'    => __( 'Please enter your phone number in the billing form first.', 'woo-cod-antifraud' ),
    118                                         'invalid_phone'  => __( 'Please enter a valid phone number in the billing form.', 'woo-cod-antifraud' ),
    119                                         'sending_otp'    => __( 'Sending OTP code...', 'woo-cod-antifraud' ),
    120                                         'resend_btn'     => __( 'Resend WhatsApp Code', 'woo-cod-antifraud' ),
    121                                         'send_error'     => __( 'Error while sending OTP.', 'woo-cod-antifraud' ),
    122                                         'conn_error'     => __( 'Server connection error. Please try again.', 'woo-cod-antifraud' ),
    123                                         'enter_6_digits' => __( 'Please enter the 6-digit code received before verifying.', 'woo-cod-antifraud' ),
    124                                         'verifying'      => __( 'Verifying code...', 'woo-cod-antifraud' ),
    125                                         'verified_btn'   => __( 'Verified', 'woo-cod-antifraud' ),
    126                                         'invalid_otp'    => __( 'Invalid or expired OTP code.', 'woo-cod-antifraud' ),
    127                                         'verify_error'   => __( 'Error during verification with server.', 'woo-cod-antifraud' ),
    128                                         'missing_phone'    => __( 'Missing phone number.', 'woo-cod-antifraud' ),
    129                                         'otp_sent'         => __( 'OTP code sent successfully!', 'woo-cod-antifraud' ),
    130                                         'verified_success' => __( 'Number verified successfully!', 'woo-cod-antifraud' ),
     117                                        'enter_phone'    => __( 'Please enter your phone number in the billing form first.', 'cod-anti-fraud-for-woocommerce' ),
     118                                        'invalid_phone'  => __( 'Please enter a valid phone number in the billing form.', 'cod-anti-fraud-for-woocommerce' ),
     119                                        'sending_otp'    => __( 'Sending OTP code...', 'cod-anti-fraud-for-woocommerce' ),
     120                                        'resend_btn'     => __( 'Resend WhatsApp Code', 'cod-anti-fraud-for-woocommerce' ),
     121                                        'send_error'     => __( 'Error while sending OTP.', 'cod-anti-fraud-for-woocommerce' ),
     122                                        'conn_error'     => __( 'Server connection error. Please try again.', 'cod-anti-fraud-for-woocommerce' ),
     123                                        'enter_6_digits' => __( 'Please enter the 6-digit code received before verifying.', 'cod-anti-fraud-for-woocommerce' ),
     124                                        'verifying'      => __( 'Verifying code...', 'cod-anti-fraud-for-woocommerce' ),
     125                                        'verified_btn'   => __( 'Verified', 'cod-anti-fraud-for-woocommerce' ),
     126                                        'invalid_otp'    => __( 'Invalid or expired OTP code.', 'cod-anti-fraud-for-woocommerce' ),
     127                                        'verify_error'   => __( 'Error during verification with server.', 'cod-anti-fraud-for-woocommerce' ),
     128                                        'missing_phone'    => __( 'Missing phone number.', 'cod-anti-fraud-for-woocommerce' ),
     129                                        'otp_sent'         => __( 'OTP code sent successfully!', 'cod-anti-fraud-for-woocommerce' ),
     130                                        'verified_success' => __( 'Number verified successfully!', 'cod-anti-fraud-for-woocommerce' ),
    131131                                ),
    132132                        );
    … …  
    157157                                        <span style="font-size:22px; line-height:1;">📱</span>
    158158                                        <div>
    159                                                 <strong style="color:#004085; font-size:14px;"><?php esc_html_e( 'Cash on Delivery verification after order confirmation', 'woo-cod-antifraud' ); ?></strong>
     159                                                <strong style="color:#004085; font-size:14px;"><?php esc_html_e( 'Cash on Delivery verification after order confirmation', 'cod-anti-fraud-for-woocommerce' ); ?></strong>
    160160                                                <p style="margin:4px 0 0 0; font-size:13px; color:#383d41;">
    161                                                         <?php esc_html_e( 'You will receive the OTP code via WhatsApp immediately after confirming the order on the receipt page.', 'woo-cod-antifraud' ); ?>
     161                                                        <?php esc_html_e( 'You will receive the OTP code via WhatsApp immediately after confirming the order on the receipt page.', 'cod-anti-fraud-for-woocommerce' ); ?>
    162162                                                </p>
    163163                                        </div>
    … …  
    171171                        <div class="wc-cod-otp-header">
    172172                                <span class="wc-cod-whatsapp-icon">📱</span>
    173                                 <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Mandatory WhatsApp Verification for Cash on Delivery', 'woo-cod-antifraud' ); ?></h3>
     173                                <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Mandatory WhatsApp Verification for Cash on Delivery', 'cod-anti-fraud-for-woocommerce' ); ?></h3>
    174174                        </div>
    175175
    176176                        <p class="wc-cod-otp-instructions">
    177                                 <?php esc_html_e( 'To complete your Cash on Delivery order, you will receive an OTP code on your WhatsApp number.', 'woo-cod-antifraud' ); ?>
     177                                <?php esc_html_e( 'To complete your Cash on Delivery order, you will receive an OTP code on your WhatsApp number.', 'cod-anti-fraud-for-woocommerce' ); ?>
    178178                        </p>
    179179
    … …  
    181181                        <div class="wc-cod-otp-actions">
    182182                                <button type="button" id="wc-cod-send-otp-btn" class="button wc-cod-btn wc-cod-btn-send">
    183                                         <span>📱 <?php esc_html_e( 'Send WhatsApp Code', 'woo-cod-antifraud' ); ?></span>
     183                                        <span>📱 <?php esc_html_e( 'Send WhatsApp Code', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    184184                                </button>
    185185                        </div>
    … …  
    188188                        <div class="wc-cod-otp-verify-block" id="wc-cod-otp-verify-block">
    189189                                <div class="wc-cod-input-row">
    190                                         <input type="text" id="wc-cod-otp-input" name="wc_cod_otp_input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', 'woo-cod-antifraud' ); ?>" maxlength="6" autocomplete="one-time-code" />
     190                                        <input type="text" id="wc-cod-otp-input" name="wc_cod_otp_input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', 'cod-anti-fraud-for-woocommerce' ); ?>" maxlength="6" autocomplete="one-time-code" />
    191191                                        <button type="button" id="wc-cod-verify-otp-btn" class="button wc-cod-btn wc-cod-btn-verify">
    192                                                 <span><?php esc_html_e( 'Verify Code', 'woo-cod-antifraud' ); ?></span>
     192                                                <span><?php esc_html_e( 'Verify Code', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    193193                                        </button>
    194194                                </div>
    … …  
    241241                        <div class="wc-cod-otp-header">
    242242                                <span class="wc-cod-whatsapp-icon">📱</span>
    243                                 <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Cash on Delivery WhatsApp Verification', 'woo-cod-antifraud' ); ?></h3>
     243                                <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Cash on Delivery WhatsApp Verification', 'cod-anti-fraud-for-woocommerce' ); ?></h3>
    244244                        </div>
    245245
    246246                        <?php if ( 'yes' === $whitelisted ) : ?>
    247247                                <div class="wc-cod-otp-status wc-cod-status-success" style="display:block; margin-top: 14px;">
    248                                         🌟 <strong><?php esc_html_e( 'Trusted Customer (Whitelist)', 'woo-cod-antifraud' ); ?></strong>
     248                                        🌟 <strong><?php esc_html_e( 'Trusted Customer (Whitelist)', 'cod-anti-fraud-for-woocommerce' ); ?></strong>
    249249                                        <p style="margin: 6px 0 0 0;">
    250250                                                <?php
    … …  
    252252                                                        sprintf(
    253253                                                                /* translators: 1: Order ID, 2: Phone number */
    254                                                                 __( 'Order #%1$d was successfully confirmed for phone %2$s without requiring OTP.', 'woo-cod-antifraud' ),
     254                                                                __( 'Order #%1$d was successfully confirmed for phone %2$s without requiring OTP.', 'cod-anti-fraud-for-woocommerce' ),
    255255                                                                intval( $order_id ),
    256256                                                                $phone
    … …  
    262262                        <?php elseif ( 'yes' === $verified ) : ?>
    263263                                <div class="wc-cod-otp-status wc-cod-status-success" style="display:block; margin-top: 14px;">
    264                                         ✅ <strong><?php esc_html_e( 'Number Verified via WhatsApp OTP', 'woo-cod-antifraud' ); ?></strong>
     264                                        ✅ <strong><?php esc_html_e( 'Number Verified via WhatsApp OTP', 'cod-anti-fraud-for-woocommerce' ); ?></strong>
    265265                                        <p style="margin: 6px 0 0 0;">
    266266                                                <?php
    … …  
    268268                                                        sprintf(
    269269                                                                /* translators: 1: Order ID, 2: Phone number */
    270                                                                 __( 'Order #%1$d has passed WhatsApp verification for phone number %2$s.', 'woo-cod-antifraud' ),
     270                                                                __( 'Order #%1$d has passed WhatsApp verification for phone number %2$s.', 'cod-anti-fraud-for-woocommerce' ),
    271271                                                                intval( $order_id ),
    272272                                                                $phone
    … …  
    282282                                                sprintf(
    283283                                                        /* translators: %s: Customer phone number */
    284                                                         __( 'Enter the OTP code sent via WhatsApp to %s to confirm verification.', 'woo-cod-antifraud' ),
     284                                                        __( 'Enter the OTP code sent via WhatsApp to %s to confirm verification.', 'cod-anti-fraud-for-woocommerce' ),
    285285                                                        $phone
    286286                                                )
    … …  
    291291                                <div class="wc-cod-otp-actions" style="margin-bottom: 12px;">
    292292                                        <button type="button" id="wc-cod-thankyou-resend-btn" class="button wc-cod-btn wc-cod-btn-send" data-phone="<?php echo esc_attr( $phone ); ?>" data-order-id="<?php echo esc_attr( $order_id ); ?>" data-order-key="<?php echo esc_attr( $order_key ); ?>">
    293                                                 <span>📱 <?php esc_html_e( 'Resend WhatsApp Code', 'woo-cod-antifraud' ); ?></span>
     293                                                <span>📱 <?php esc_html_e( 'Resend WhatsApp Code', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    294294                                        </button>
    295295                                </div>
    … …  
    297297                                <div class="wc-cod-otp-verify-block" style="display:block;">
    298298                                        <div class="wc-cod-input-row">
    299                                                 <input type="text" id="wc-cod-thankyou-otp-input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', 'woo-cod-antifraud' ); ?>" maxlength="6" autocomplete="one-time-code" />
     299                                                <input type="text" id="wc-cod-thankyou-otp-input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', 'cod-anti-fraud-for-woocommerce' ); ?>" maxlength="6" autocomplete="one-time-code" />
    300300                                                <input type="hidden" id="wc-cod-thankyou-order-key" value="<?php echo esc_attr( $order_key ); ?>" />
    301301                                                <button type="button" id="wc-cod-thankyou-verify-btn" class="button wc-cod-btn wc-cod-btn-verify" data-phone="<?php echo esc_attr( $phone ); ?>" data-order-id="<?php echo esc_attr( $order_id ); ?>" data-order-key="<?php echo esc_attr( $order_key ); ?>">
    302                                                         <span><?php esc_html_e( 'Verify Code', 'woo-cod-antifraud' ); ?></span>
     302                                                        <span><?php esc_html_e( 'Verify Code', 'cod-anti-fraud-for-woocommerce' ); ?></span>
    303303                                                </button>
    304304                                        </div>
    … …  
    322322                        return array(
    323323                                'valid'   => false,
    324                                 'message' => __( 'WooCommerce is not available.', 'woo-cod-antifraud' ),
     324                                'message' => __( 'WooCommerce is not available.', 'cod-anti-fraud-for-woocommerce' ),
    325325                        );
    326326                }
    … …  
    330330                        return array(
    331331                                'valid'   => false,
    332                                 'message' => __( 'Invalid order specified.', 'woo-cod-antifraud' ),
     332                                'message' => __( 'Invalid order specified.', 'cod-anti-fraud-for-woocommerce' ),
    333333                        );
    334334                }
    … …  
    337337                        return array(
    338338                                'valid'   => false,
    339                                 'message' => __( 'The specified order does not use Cash on Delivery.', 'woo-cod-antifraud' ),
     339                                'message' => __( 'The specified order does not use Cash on Delivery.', 'cod-anti-fraud-for-woocommerce' ),
    340340                        );
    341341                }
    … …  
    368368                        return array(
    369369                                'valid'   => false,
    370                                 'message' => __( 'Permission denied or invalid order verification key.', 'woo-cod-antifraud' ),
     370                                'message' => __( 'Permission denied or invalid order verification key.', 'cod-anti-fraud-for-woocommerce' ),
    371371                        );
    372372                }
    … …  
    382382                                return array(
    383383                                        'valid'   => false,
    384                                         'message' => __( 'The verified phone number does not match the billing phone number of this order.', 'woo-cod-antifraud' ),
     384                                        'message' => __( 'The verified phone number does not match the billing phone number of this order.', 'cod-anti-fraud-for-woocommerce' ),
    385385                                );
    386386                        }
    … …  
    406406                        wp_send_json_success( array(
    407407                                'blacklisted' => true,
    408                                 'message'     => __( 'Cash on Delivery payment is not available for this address.', 'woo-cod-antifraud' ),
     408                                'message'     => __( 'Cash on Delivery payment is not available for this address.', 'cod-anti-fraud-for-woocommerce' ),
    409409                        ) );
    410410                }
    … …  
    413413                        wp_send_json_success( array(
    414414                                'whitelisted' => true,
    415                                 'message'     => __( 'VIP/Trusted customer: OTP verification not required.', 'woo-cod-antifraud' ),
     415                                'message'     => __( 'VIP/Trusted customer: OTP verification not required.', 'cod-anti-fraud-for-woocommerce' ),
    416416                        ) );
    417417                }
    … …  
    451451                                wp_send_json_success( array(
    452452                                        'already_verified' => true,
    453                                         'message'          => __( 'Order is already verified.', 'woo-cod-antifraud' ),
     453                                        'message'          => __( 'Order is already verified.', 'cod-anti-fraud-for-woocommerce' ),
    454454                                ) );
    455455                        }
    … …  
    480480
    481481                if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) {
    482                         wp_send_json_error( array( 'message' => __( 'Please enter your phone number in the billing form first.', 'woo-cod-antifraud' ) ) );
     482                        wp_send_json_error( array( 'message' => __( 'Please enter your phone number in the billing form first.', 'cod-anti-fraud-for-woocommerce' ) ) );
    483483                }
    484484
    … …  
    487487                        wp_send_json_error( array(
    488488                                'blacklisted' => true,
    489                                 'message'     => __( 'Cash on Delivery is not authorized for this contact. Please select another payment method.', 'woo-cod-antifraud' ),
     489                                'message'     => __( 'Cash on Delivery is not authorized for this contact. Please select another payment method.', 'cod-anti-fraud-for-woocommerce' ),
    490490                        ) );
    491491                }
    … …  
    513513                        wp_send_json_success( array(
    514514                                'whitelisted' => true,
    515                                 'message'     => __( 'Phone number verified automatically (Trusted Whitelist Customer).', 'woo-cod-antifraud' ),
     515                                'message'     => __( 'Phone number verified automatically (Trusted Whitelist Customer).', 'cod-anti-fraud-for-woocommerce' ),
    516516                                'token'       => $token,
    517517                        ) );
    … …  
    527527                $settings = get_option( 'wc_cod_antifraud_settings', array() );
    528528                if ( ! WCCAF_WhatsApp::is_configured( $settings ) ) {
    529                         wp_send_json_error( array( 'message' => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', 'woo-cod-antifraud' ) ) );
     529                        wp_send_json_error( array( 'message' => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', 'cod-anti-fraud-for-woocommerce' ) ) );
    530530                }
    531531
    … …  
    539539                        // Strict Information Leakage Prevention: NEVER return OTP to client
    540540                        wp_send_json_success( array(
    541                                 'message' => __( 'Code sent! Please check your WhatsApp.', 'woo-cod-antifraud' ),
     541                                'message' => __( 'Code sent! Please check your WhatsApp.', 'cod-anti-fraud-for-woocommerce' ),
    542542                        ) );
    543543                } else {
    544                         $error_message = ! empty( $result['message'] ) ? sanitize_text_field( $result['message'] ) : __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'woo-cod-antifraud' );
     544                        $error_message = ! empty( $result['message'] ) ? sanitize_text_field( $result['message'] ) : __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'cod-anti-fraud-for-woocommerce' );
    545545                        wp_send_json_error( array( 'message' => $error_message ) );
    546546                }
    … …  
    578578
    579579                if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) {
    580                         wp_send_json_error( array( 'message' => __( 'Missing or invalid phone number.', 'woo-cod-antifraud' ) ) );
     580                        wp_send_json_error( array( 'message' => __( 'Missing or invalid phone number.', 'cod-anti-fraud-for-woocommerce' ) ) );
    581581                }
    582582
    583583                if ( empty( $otp ) || strlen( $otp ) !== 6 ) {
    584                         wp_send_json_error( array( 'message' => __( 'Please enter a valid 6-digit OTP code.', 'woo-cod-antifraud' ) ) );
     584                        wp_send_json_error( array( 'message' => __( 'Please enter a valid 6-digit OTP code.', 'cod-anti-fraud-for-woocommerce' ) ) );
    585585                }
    586586
    … …  
    598598
    599599                        wp_send_json_success( array(
    600                                 'message' => __( 'Number verified successfully!', 'woo-cod-antifraud' ),
     600                                'message' => __( 'Number verified successfully!', 'cod-anti-fraud-for-woocommerce' ),
    601601                                'token'   => $token,
    602602                        ) );
    … …  
    636636                if ( WCCAF_Risk_Engine::is_blacklisted( $clean_phone, $billing_email ) ) {
    637637                        if ( function_exists( 'wc_add_notice' ) ) {
    638                                 wc_add_notice( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'woo-cod-antifraud' ), 'error' );
     638                                wc_add_notice( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'cod-anti-fraud-for-woocommerce' ), 'error' );
    639639                        }
    640640                        return;
    … …  
    650650                                $notice_msg = sprintf(
    651651                                        /* translators: 1: formatted cart total, 2: formatted maximum amount */
    652                                         __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'woo-cod-antifraud' ),
     652                                        __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'cod-anti-fraud-for-woocommerce' ),
    653653                                        wc_price( $cart_total ),
    654654                                        wc_price( $max_amount )
    … …  
    666666                if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) {
    667667                        if ( function_exists( 'wc_add_notice' ) ) {
    668                                 wc_add_notice( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'woo-cod-antifraud' ), 'error' );
     668                                wc_add_notice( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'cod-anti-fraud-for-woocommerce' ), 'error' );
    669669                        }
    670670                        return;
    … …  
    689689                        if ( ! WCCAF_OTP_Manager::is_phone_verified_in_session( $clean_phone, $token ) ) {
    690690                                if ( function_exists( 'wc_add_notice' ) ) {
    691                                         wc_add_notice( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'woo-cod-antifraud' ), 'error' );
     691                                        wc_add_notice( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'cod-anti-fraud-for-woocommerce' ), 'error' );
    692692                                }
    693693                        }
    … …  
    716716                // 1. Blacklist Check
    717717                if ( WCCAF_Risk_Engine::is_blacklisted( $clean_phone, $billing_email ) ) {
    718                         $errors->add( 'validation', esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'woo-cod-antifraud' ) );
     718                        $errors->add( 'validation', esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'cod-anti-fraud-for-woocommerce' ) );
    719719                        return;
    720720                }
    … …  
    730730                        $notice_msg     = sprintf(
    731731                                /* translators: 1: formatted cart total, 2: formatted maximum amount */
    732                                 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'woo-cod-antifraud' ),
     732                                __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'cod-anti-fraud-for-woocommerce' ),
    733733                                $formatted_cart,
    734734                                $formatted_max
    … …  
    744744
    745745                if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) {
    746                         $errors->add( 'validation', esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'woo-cod-antifraud' ) );
     746                        $errors->add( 'validation', esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'cod-anti-fraud-for-woocommerce' ) );
    747747                        return;
    748748                }
    … …  
    765765                        $token = isset( $_POST['wc_cod_otp_token'] ) ? sanitize_text_field( wp_unslash( $_POST['wc_cod_otp_token'] ) ) : '';
    766766                        if ( ! WCCAF_OTP_Manager::is_phone_verified_in_session( $clean_phone, $token ) ) {
    767                                 $errors->add( 'validation', esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'woo-cod-antifraud' ) );
     767                                $errors->add( 'validation', esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'cod-anti-fraud-for-woocommerce' ) );
    768768                        }
    769769                }
    … …  
    795795                // 1. Blacklist Check
    796796                if ( WCCAF_Risk_Engine::is_blacklisted( $clean_phone, $billing_email ) ) {
    797                         throw new \Exception( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'woo-cod-antifraud' ) );
     797                        throw new \Exception( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'cod-anti-fraud-for-woocommerce' ) );
    798798                }
    799799
    … …  
    808808                        $exception_msg  = sprintf(
    809809                                /* translators: 1: formatted cart total, 2: formatted maximum amount */
    810                                 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'woo-cod-antifraud' ),
     810                                __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'cod-anti-fraud-for-woocommerce' ),
    811811                                $formatted_cart,
    812812                                $formatted_max
    … …  
    821821
    822822                if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) {
    823                         throw new \Exception( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'woo-cod-antifraud' ) );
     823                        throw new \Exception( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'cod-anti-fraud-for-woocommerce' ) );
    824824                }
    825825
    … …  
    839839                if ( $is_required ) {
    840840                        if ( ! WCCAF_OTP_Manager::is_phone_verified_in_session( $clean_phone ) ) {
    841                                 throw new \Exception( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'woo-cod-antifraud' ) );
     841                                throw new \Exception( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'cod-anti-fraud-for-woocommerce' ) );
    842842                        }
    843843                }
    … …  
    867867                        // Strict Integrity Gate: se OTP è obbligatorio in pre-checkout, impedire la creazione dell'ordine non verificato
    868868                        if ( 'pre_checkout' === $timing && $required && 'yes' !== $is_verified ) {
    869                                 throw new \Exception( esc_html__( 'Cash on Delivery order cannot be placed without completing WhatsApp OTP phone verification.', 'woo-cod-antifraud' ) );
     869                                throw new \Exception( esc_html__( 'Cash on Delivery order cannot be placed without completing WhatsApp OTP phone verification.', 'cod-anti-fraud-for-woocommerce' ) );
    870870                        }
    871871
  • cod-anti-fraud-for-woocommerce/trunk/includes/class-wccaf-otp-manager.php

    r3778566 r3798076  
    111111                                                'message'     => sprintf(
    112112                                                        /* translators: 1: max requests, 2: minutes left */
    113                                                         __( 'You have exceeded the maximum number of attempts (%1$d requests). Please try again in %2$d minutes.', 'woo-cod-antifraud' ),
     113                                                        __( 'You have exceeded the maximum number of attempts (%1$d requests). Please try again in %2$d minutes.', 'cod-anti-fraud-for-woocommerce' ),
    114114                                                        $max_requests,
    115115                                                        $time_left
    … …  
    134134                                                'message'     => sprintf(
    135135                                                        /* translators: %d: minutes left */
    136                                                         __( 'Too many requests from this IP address. Please try again in %d minutes.', 'woo-cod-antifraud' ),
     136                                                        __( 'Too many requests from this IP address. Please try again in %d minutes.', 'cod-anti-fraud-for-woocommerce' ),
    137137                                                        $time_left
    138138                                                ),
    … …  
    253253                        return array(
    254254                                'success' => false,
    255                                 'message' => __( 'Phone number or OTP code not provided.', 'woo-cod-antifraud' ),
     255                                'message' => __( 'Phone number or OTP code not provided.', 'cod-anti-fraud-for-woocommerce' ),
    256256                        );
    257257                }
    … …  
    271271                        return array(
    272272                                'success' => false,
    273                                 'message' => __( 'OTP code expired or invalid. Please request a new one.', 'woo-cod-antifraud' ),
     273                                'message' => __( 'OTP code expired or invalid. Please request a new one.', 'cod-anti-fraud-for-woocommerce' ),
    274274                        );
    275275                }
    … …  
    289289                        return array(
    290290                                'success' => false,
    291                                 'message' => __( 'OTP code expired. Please request a new one.', 'woo-cod-antifraud' ),
     291                                'message' => __( 'OTP code expired. Please request a new one.', 'cod-anti-fraud-for-woocommerce' ),
    292292                        );
    293293                }
    … …  
    303303                        return array(
    304304                                'success' => false,
    305                                 'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', 'woo-cod-antifraud' ),
     305                                'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', 'cod-anti-fraud-for-woocommerce' ),
    306306                        );
    307307                }
    … …  
    337337                        return array(
    338338                                'success' => true,
    339                                 'message' => __( 'Number verified successfully!', 'woo-cod-antifraud' ),
     339                                'message' => __( 'Number verified successfully!', 'cod-anti-fraud-for-woocommerce' ),
    340340                                'token'   => $token,
    341341                        );
    … …  
    350350                        return array(
    351351                                'success' => false,
    352                                 'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', 'woo-cod-antifraud' ),
     352                                'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', 'cod-anti-fraud-for-woocommerce' ),
    353353                        );
    354354                }
    … …  
    364364                        'message' => sprintf(
    365365                                /* translators: %d: remaining attempts */
    366                                 __( 'Incorrect OTP code. Attempts remaining: %d', 'woo-cod-antifraud' ),
     366                                __( 'Incorrect OTP code. Attempts remaining: %d', 'cod-anti-fraud-for-woocommerce' ),
    367367                                max( 0, $max_attempts - $data['attempts'] )
    368368                        ),
  • cod-anti-fraud-for-woocommerce/trunk/includes/class-wccaf-settings.php

    r3778566 r3798076  
    2222        public function __construct() {
    2323                $this->id    = 'wc_cod_antifraud';
    24                 $this->label = __( 'COD Anti-Fraud', 'woo-cod-antifraud' );
     24                $this->label = __( 'COD Anti-Fraud', 'cod-anti-fraud-for-woocommerce' );
    2525
    2626                parent::__construct();
    … …  
    3434        public function get_sections() {
    3535                $sections = array(
    36                         '' => __( 'General Settings', 'woo-cod-antifraud' ),
     36                        '' => __( 'General Settings', 'cod-anti-fraud-for-woocommerce' ),
    3737                );
    3838                // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
    … …  
    4848                $settings = array(
    4949                        array(
    50                                 'title' => __( 'WooCommerce COD Anti-Fraud Settings', 'woo-cod-antifraud' ),
     50                                'title' => __( 'WooCommerce COD Anti-Fraud Settings', 'cod-anti-fraud-for-woocommerce' ),
    5151                                'type'  => 'title',
    52                                 'desc'  => __( 'Configure WhatsApp OTP verification and risk score management for Cash on Delivery orders. Protection is always active and operates in blocking pre-checkout mode before the order is placed.', 'woo-cod-antifraud' ),
     52                                'desc'  => __( 'Configure WhatsApp OTP verification and risk score management for Cash on Delivery orders. Protection is always active and operates in blocking pre-checkout mode before the order is placed.', 'cod-anti-fraud-for-woocommerce' ),
    5353                                'id'    => 'wc_cod_antifraud_options_section',
    5454                        ),
    5555
    5656                        array(
    57                                 'title'    => __( 'OTP Verification Mode (Pre-Checkout Blocking)', 'woo-cod-antifraud' ),
    58                                 'desc'     => __( 'WhatsApp OTP verification occurs directly in cart/checkout before placing the order. Select activation condition.', 'woo-cod-antifraud' ),
     57                                'title'    => __( 'OTP Verification Mode (Pre-Checkout Blocking)', 'cod-anti-fraud-for-woocommerce' ),
     58                                'desc'     => __( 'WhatsApp OTP verification occurs directly in cart/checkout before placing the order. Select activation condition.', 'cod-anti-fraud-for-woocommerce' ),
    5959                                'id'       => 'wc_cod_antifraud_settings[require_otp_mode]',
    6060                                'default'  => 'always',
    6161                                'type'     => 'select',
    6262                                'options'  => array(
    63                                         'always'     => __( 'Always Required (All Cash on Delivery Orders)', 'woo-cod-antifraud' ),
    64                                         'risk_based' => __( 'Conditional (Based on Risk Score or Cart Total)', 'woo-cod-antifraud' ),
    65                                 ),
    66                         ),
    67 
    68                         array(
    69                                 'title'             => __( 'Risk Score Threshold (0-100)', 'woo-cod-antifraud' ),
    70                                 'desc'              => __( 'Require OTP if calculated risk score exceeds this value (only applied in conditional mode).', 'woo-cod-antifraud' ),
     63                                        'always'     => __( 'Always Required (All Cash on Delivery Orders)', 'cod-anti-fraud-for-woocommerce' ),
     64                                        'risk_based' => __( 'Conditional (Based on Risk Score or Cart Total)', 'cod-anti-fraud-for-woocommerce' ),
     65                                ),
     66                        ),
     67
     68                        array(
     69                                'title'             => __( 'Risk Score Threshold (0-100)', 'cod-anti-fraud-for-woocommerce' ),
     70                                'desc'              => __( 'Require OTP if calculated risk score exceeds this value (only applied in conditional mode).', 'cod-anti-fraud-for-woocommerce' ),
    7171                                'id'                => 'wc_cod_antifraud_settings[risk_threshold]',
    7272                                'default'           => '40',
    … …  
    8080
    8181                        array(
    82                                 'title'             => __( 'Minimum Cart Amount for OTP (€)', 'woo-cod-antifraud' ),
    83                                 'desc'              => __( 'Require OTP only if cart total equals or exceeds this amount (0 for no minimum).', 'woo-cod-antifraud' ),
     82                                'title'             => __( 'Minimum Cart Amount for OTP (€)', 'cod-anti-fraud-for-woocommerce' ),
     83                                'desc'              => __( 'Require OTP only if cart total equals or exceeds this amount (0 for no minimum).', 'cod-anti-fraud-for-woocommerce' ),
    8484                                'id'                => 'wc_cod_antifraud_settings[min_cart_amount_otp]',
    8585                                'default'           => '0',
    … …  
    9292
    9393                        array(
    94                                 'title'             => __( 'Maximum COD Cart Threshold (€)', 'woo-cod-antifraud' ),
    95                                 'desc'              => __( 'Maximum cart value above which the high-threshold rule is applied.', 'woo-cod-antifraud' ),
     94                                'title'             => __( 'Maximum COD Cart Threshold (€)', 'cod-anti-fraud-for-woocommerce' ),
     95                                'desc'              => __( 'Maximum cart value above which the high-threshold rule is applied.', 'cod-anti-fraud-for-woocommerce' ),
    9696                                'id'                => 'wc_cod_antifraud_settings[max_cart_amount_cod]',
    9797                                'default'           => '500',
    … …  
    104104
    105105                        array(
    106                                 'title'    => __( 'Action Above Maximum Threshold', 'woo-cod-antifraud' ),
    107                                 'desc'     => __( 'Action to take when cart total exceeds the maximum threshold.', 'woo-cod-antifraud' ),
     106                                'title'    => __( 'Action Above Maximum Threshold', 'cod-anti-fraud-for-woocommerce' ),
     107                                'desc'     => __( 'Action to take when cart total exceeds the maximum threshold.', 'cod-anti-fraud-for-woocommerce' ),
    108108                                'id'       => 'wc_cod_antifraud_settings[max_cart_action]',
    109109                                'default'  => 'require_otp',
    110110                                'type'     => 'select',
    111111                                'options'  => array(
    112                                         'require_otp' => __( 'Require WhatsApp OTP Verification', 'woo-cod-antifraud' ),
    113                                         'disable_cod' => __( 'Disable Cash on Delivery Payment Method', 'woo-cod-antifraud' ),
    114                                 ),
    115                         ),
    116 
    117                         array(
    118                                 'title'       => __( 'Phone / Email Blacklist', 'woo-cod-antifraud' ),
    119                                 'desc'        => __( 'Enter phone numbers or emails to block from Cash on Delivery (one per line or comma-separated).', 'woo-cod-antifraud' ),
     112                                        'require_otp' => __( 'Require WhatsApp OTP Verification', 'cod-anti-fraud-for-woocommerce' ),
     113                                        'disable_cod' => __( 'Disable Cash on Delivery Payment Method', 'cod-anti-fraud-for-woocommerce' ),
     114                                ),
     115                        ),
     116
     117                        array(
     118                                'title'       => __( 'Phone / Email Blacklist', 'cod-anti-fraud-for-woocommerce' ),
     119                                'desc'        => __( 'Enter phone numbers or emails to block from Cash on Delivery (one per line or comma-separated).', 'cod-anti-fraud-for-woocommerce' ),
    120120                                'id'          => 'wc_cod_antifraud_settings[blacklist_phones]',
    121121                                'default'     => '',
    … …  
    125125
    126126                        array(
    127                                 'title'       => __( 'Phone / Email Whitelist (VIP)', 'woo-cod-antifraud' ),
    128                                 'desc'        => __( 'Enter trusted phone numbers or emails to automatically bypass OTP verification (one per line or comma-separated).', 'woo-cod-antifraud' ),
     127                                'title'       => __( 'Phone / Email Whitelist (VIP)', 'cod-anti-fraud-for-woocommerce' ),
     128                                'desc'        => __( 'Enter trusted phone numbers or emails to automatically bypass OTP verification (one per line or comma-separated).', 'cod-anti-fraud-for-woocommerce' ),
    129129                                'id'          => 'wc_cod_antifraud_settings[whitelist_phones]',
    130130                                'default'     => '',
    … …  
    134134
    135135                        array(
    136                                 'title'             => __( 'Max OTP Requests Limit', 'woo-cod-antifraud' ),
    137                                 'desc'              => __( 'Maximum number of OTP requests allowed before temporary lock.', 'woo-cod-antifraud' ),
     136                                'title'             => __( 'Max OTP Requests Limit', 'cod-anti-fraud-for-woocommerce' ),
     137                                'desc'              => __( 'Maximum number of OTP requests allowed before temporary lock.', 'cod-anti-fraud-for-woocommerce' ),
    138138                                'id'                => 'wc_cod_antifraud_settings[rate_limit_max_requests]',
    139139                                'default'           => '3',
    … …  
    146146
    147147                        array(
    148                                 'title'             => __( 'Rate Limit Window (minutes)', 'woo-cod-antifraud' ),
    149                                 'desc'              => __( 'Validity period for request limit in minutes.', 'woo-cod-antifraud' ),
     148                                'title'             => __( 'Rate Limit Window (minutes)', 'cod-anti-fraud-for-woocommerce' ),
     149                                'desc'              => __( 'Validity period for request limit in minutes.', 'cod-anti-fraud-for-woocommerce' ),
    150150                                'id'                => 'wc_cod_antifraud_settings[rate_limit_window_minutes]',
    151151                                'default'           => '10',
    … …  
    158158
    159159                        array(
    160                                 'title'    => __( 'WhatsApp Provider', 'woo-cod-antifraud' ),
    161                                 'desc'     => __( 'Select the WhatsApp provider for sending OTP codes.', 'woo-cod-antifraud' ),
     160                                'title'    => __( 'WhatsApp Provider', 'cod-anti-fraud-for-woocommerce' ),
     161                                'desc'     => __( 'Select the WhatsApp provider for sending OTP codes.', 'cod-anti-fraud-for-woocommerce' ),
    162162                                'id'       => 'wc_cod_antifraud_settings[whatsapp_provider]',
    163163                                'default'  => 'beralabs',
    164164                                'type'     => 'select',
    165165                                'options'  => array(
    166                                         'beralabs' => __( 'BeraLabs Gateway (Proprietary)', 'woo-cod-antifraud' ),
    167                                         'ultramsg' => __( 'UltraMsg API', 'woo-cod-antifraud' ),
    168                                 ),
    169                         ),
    170 
    171                         array(
    172                                 'title'       => __( 'BeraLabs Gateway Endpoint', 'woo-cod-antifraud' ),
    173                                 'desc'        => __( 'Endpoint URL for BeraLabs WhatsApp OTP microservice (e.g., https://api.beralabs.it/wa/api/send-otp).', 'woo-cod-antifraud' ),
     166                                        'beralabs' => __( 'BeraLabs Gateway (Proprietary)', 'cod-anti-fraud-for-woocommerce' ),
     167                                        'ultramsg' => __( 'UltraMsg API', 'cod-anti-fraud-for-woocommerce' ),
     168                                ),
     169                        ),
     170
     171                        array(
     172                                'title'       => __( 'BeraLabs Gateway Endpoint', 'cod-anti-fraud-for-woocommerce' ),
     173                                'desc'        => __( 'Endpoint URL for BeraLabs WhatsApp OTP microservice (e.g., https://api.beralabs.it/wa/api/send-otp).', 'cod-anti-fraud-for-woocommerce' ),
    174174                                'id'          => 'wc_cod_antifraud_settings[beralabs_endpoint]',
    175175                                'default'     => 'https://api.beralabs.it/wa/api/send-otp',
    … …  
    179179
    180180                        array(
    181                                 'title'       => __( 'BeraLabs API Key', 'woo-cod-antifraud' ),
    182                                 'desc'        => __( 'Enter the secret API key (x-api-key) for authentication with BeraLabs gateway.', 'woo-cod-antifraud' ) . '<br><a href="https://beralabs.it/whatsapp-gateway.html" target="_blank" rel="noopener noreferrer" class="button button-secondary" style="margin-top:8px; display:inline-block; font-weight:600;">' . __( 'Request WhatsApp API Key', 'woo-cod-antifraud' ) . ' &rarr;</a>',
     181                                'title'       => __( 'BeraLabs API Key', 'cod-anti-fraud-for-woocommerce' ),
     182                                'desc'        => __( 'Enter the secret API key (x-api-key) for authentication with BeraLabs gateway.', 'cod-anti-fraud-for-woocommerce' ) . '<br><a href="https://beralabs.it/whatsapp-gateway.html" target="_blank" rel="noopener noreferrer" class="button button-secondary" style="margin-top:8px; display:inline-block; font-weight:600;">' . __( 'Request WhatsApp API Key', 'cod-anti-fraud-for-woocommerce' ) . ' &rarr;</a>',
    183183                                'id'          => 'wc_cod_antifraud_settings[beralabs_api_key]',
    184184                                'default'     => '',
    … …  
    188188
    189189                        array(
    190                                 'title'   => __( 'UltraMsg Instance ID', 'woo-cod-antifraud' ),
    191                                 'desc'    => __( 'Enter the Instance ID provided by UltraMsg (e.g., instance12345). Only used if UltraMsg provider is selected.', 'woo-cod-antifraud' ),
     190                                'title'   => __( 'UltraMsg Instance ID', 'cod-anti-fraud-for-woocommerce' ),
     191                                'desc'    => __( 'Enter the Instance ID provided by UltraMsg (e.g., instance12345). Only used if UltraMsg provider is selected.', 'cod-anti-fraud-for-woocommerce' ),
    192192                                'id'      => 'wc_cod_antifraud_settings[instance_id]',
    193193                                'default' => '',
    … …  
    196196
    197197                        array(
    198                                 'title'   => __( 'UltraMsg API Token', 'woo-cod-antifraud' ),
    199                                 'desc'    => __( 'Enter the secret API Token provided by UltraMsg. Only used if UltraMsg provider is selected.', 'woo-cod-antifraud' ),
     198                                'title'   => __( 'UltraMsg API Token', 'cod-anti-fraud-for-woocommerce' ),
     199                                'desc'    => __( 'Enter the secret API Token provided by UltraMsg. Only used if UltraMsg provider is selected.', 'cod-anti-fraud-for-woocommerce' ),
    200200                                'id'      => 'wc_cod_antifraud_settings[api_token]',
    201201                                'default' => '',
    … …  
    204204
    205205                        array(
    206                                 'title'             => __( 'OTP Expiry (minutes)', 'woo-cod-antifraud' ),
    207                                 'desc'              => __( 'Validity duration of the generated OTP code.', 'woo-cod-antifraud' ),
     206                                'title'             => __( 'OTP Expiry (minutes)', 'cod-anti-fraud-for-woocommerce' ),
     207                                'desc'              => __( 'Validity duration of the generated OTP code.', 'cod-anti-fraud-for-woocommerce' ),
    208208                                'id'                => 'wc_cod_antifraud_settings[otp_expiry_minutes]',
    209209                                'default'           => '5',
    … …  
    216216
    217217                        array(
    218                                 'title'             => __( 'Maximum OTP Attempts', 'woo-cod-antifraud' ),
    219                                 'desc'              => __( 'Number of incorrect code attempts allowed before invalidation.', 'woo-cod-antifraud' ),
     218                                'title'             => __( 'Maximum OTP Attempts', 'cod-anti-fraud-for-woocommerce' ),
     219                                'desc'              => __( 'Number of incorrect code attempts allowed before invalidation.', 'cod-anti-fraud-for-woocommerce' ),
    220220                                'id'                => 'wc_cod_antifraud_settings[max_attempts]',
    221221                                'default'           => '3',
    … …  
    228228
    229229                        array(
    230                                 'title'   => __( 'WhatsApp Message Template', 'woo-cod-antifraud' ),
    231                                 'desc'    => __( 'Use {{otp}} as a placeholder for the generated numerical code.', 'woo-cod-antifraud' ),
     230                                'title'   => __( 'WhatsApp Message Template', 'cod-anti-fraud-for-woocommerce' ),
     231                                'desc'    => __( 'Use {{otp}} as a placeholder for the generated numerical code.', 'cod-anti-fraud-for-woocommerce' ),
    232232                                'id'      => 'wc_cod_antifraud_settings[custom_message_template]',
    233                                 'default' => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'woo-cod-antifraud' ),
     233                                'default' => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' ),
    234234                                'type'    => 'textarea',
    235235                        ),
    … …  
    262262        public function save() {
    263263                if ( ! current_user_can( 'manage_woocommerce' ) && ! current_user_can( 'manage_options' ) ) {
    264                         wp_die( esc_html__( 'You do not have permission to modify these settings.', 'woo-cod-antifraud' ) );
     264                        wp_die( esc_html__( 'You do not have permission to modify these settings.', 'cod-anti-fraud-for-woocommerce' ) );
    265265                }
    266266
  • cod-anti-fraud-for-woocommerce/trunk/includes/class-wccaf-whatsapp.php

    r3778566 r3798076  
    5757                        return array(
    5858                                'success' => false,
    59                                 'message' => __( 'Invalid phone number for WhatsApp delivery.', 'woo-cod-antifraud' ),
     59                                'message' => __( 'Invalid phone number for WhatsApp delivery.', 'cod-anti-fraud-for-woocommerce' ),
    6060                        );
    6161                }
    … …  
    6767                        return array(
    6868                                'success' => false,
    69                                 'message' => __( 'WhatsApp Gateway not configured. Please enter your API credentials in plugin settings.', 'woo-cod-antifraud' ),
     69                                'message' => __( 'WhatsApp Gateway not configured. Please enter your API credentials in plugin settings.', 'cod-anti-fraud-for-woocommerce' ),
    7070                        );
    7171                }
    … …  
    7373                $template = isset( $settings['custom_message_template'] ) && ! empty( $settings['custom_message_template'] )
    7474                        ? $settings['custom_message_template']
    75                         : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'woo-cod-antifraud' );
     75                        : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' );
    7676
    7777                $message = str_replace( '{{otp}}', $otp, $template );
    … …  
    9191                return array(
    9292                        'success' => false,
    93                         'message' => __( 'Unsupported WhatsApp provider.', 'woo-cod-antifraud' ),
     93                        'message' => __( 'Unsupported WhatsApp provider.', 'cod-anti-fraud-for-woocommerce' ),
    9494                );
    9595        }
    … …  
    131131                        return array(
    132132                                'success' => false,
    133                                 'message' => __( 'Unable to connect to WhatsApp Gateway. Please try again later.', 'woo-cod-antifraud' ),
     133                                'message' => __( 'Unable to connect to WhatsApp Gateway. Please try again later.', 'cod-anti-fraud-for-woocommerce' ),
    134134                        );
    135135                }
    … …  
    142142                        return array(
    143143                                'success'    => true,
    144                                 'message'    => __( 'Code sent! Please check your WhatsApp.', 'woo-cod-antifraud' ),
     144                                'message'    => __( 'Code sent! Please check your WhatsApp.', 'cod-anti-fraud-for-woocommerce' ),
    145145                                'message_id' => isset( $data['messageId'] ) ? sanitize_text_field( $data['messageId'] ) : '',
    146146                        );
    … …  
    153153                return array(
    154154                        'success' => false,
    155                         'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'woo-cod-antifraud' ),
     155                        'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'cod-anti-fraud-for-woocommerce' ),
    156156                );
    157157        }
    … …  
    186186                        return array(
    187187                                'success' => false,
    188                                 'message' => __( 'Unable to connect to WhatsApp provider. Please try again later.', 'woo-cod-antifraud' ),
     188                                'message' => __( 'Unable to connect to WhatsApp provider. Please try again later.', 'cod-anti-fraud-for-woocommerce' ),
    189189                        );
    190190                }
    … …  
    197197                        return array(
    198198                                'success' => true,
    199                                 'message' => __( 'Code sent! Please check your WhatsApp.', 'woo-cod-antifraud' ),
     199                                'message' => __( 'Code sent! Please check your WhatsApp.', 'cod-anti-fraud-for-woocommerce' ),
    200200                        );
    201201                }
    … …  
    207207                return array(
    208208                        'success' => false,
    209                         'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'woo-cod-antifraud' ),
     209                        'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'cod-anti-fraud-for-woocommerce' ),
    210210                );
    211211        }
  • cod-anti-fraud-for-woocommerce/trunk/languages/woo-cod-antifraud.pot

    r3769631 r3798076  
    77msgid ""
    88msgstr ""
    9 "Project-Id-Version: COD Anti-Fraud for WooCommerce 2.0.1\n"
     9"Project-Id-Version: COD Anti-Fraud for WooCommerce 2.0.2\n"
    1010"Report-Msgid-Bugs-To: https://beralabs.it\n"
    11 "POT-Creation-Date: 2026-10-25 17:51+0100\n"
     11"POT-Creation-Date: 2026-11-12 11:07+0100\n"
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    … …  
    1818"Content-Transfer-Encoding: 8bit\n"
    1919
    20 #: woo-cod-antifraud.php:129
    21 #, php-format
    22 msgid "WooCommerce COD Anti-Fraud requires %s to be installed and active."
    23 msgstr ""
    24 
    25 #: woo-cod-antifraud.php:168 includes/class-wccaf-whatsapp.php:72
    26 #: includes/class-wccaf-settings.php:236
     20#: includes/class-wccaf-admin.php:46
     21msgid "Settings"
     22msgstr ""
     23
     24#: includes/class-wccaf-admin.php:144 includes/class-wccaf-settings.php:233
     25#: includes/class-wccaf-whatsapp.php:75 woo-cod-antifraud.php:170
    2726msgid ""
    2827"Your verification code for the Cash on Delivery order is: {{otp}}. Valid for "
    … …  
    3029msgstr ""
    3130
    32 #: includes/class-wccaf-otp-manager.php:72
    33 #, php-format
    34 msgid ""
    35 "You have exceeded the maximum number of attempts (%1$d requests). Please try "
    36 "again in %2$d minutes."
    37 msgstr ""
    38 
    39 #: includes/class-wccaf-otp-manager.php:95
    40 #, php-format
    41 msgid "Too many requests from this IP address. Please try again in %d minutes."
    42 msgstr ""
    43 
    44 #: includes/class-wccaf-otp-manager.php:200
    45 msgid "Phone number or OTP code not provided."
    46 msgstr ""
    47 
    48 #: includes/class-wccaf-otp-manager.php:210
    49 msgid "OTP code expired or invalid. Please request a new one."
    50 msgstr ""
    51 
    52 #: includes/class-wccaf-otp-manager.php:224
    53 msgid ""
    54 "Maximum number of incorrect attempts exceeded. Please request a new code."
    55 msgstr ""
    56 
    57 #: includes/class-wccaf-otp-manager.php:238
    58 #: includes/class-wccaf-checkout.php:130 includes/class-wccaf-checkout.php:446
    59 msgid "Number verified successfully!"
    60 msgstr ""
    61 
    62 #: includes/class-wccaf-otp-manager.php:251
    63 #, php-format
    64 msgid "Incorrect OTP code. Attempts remaining: %d"
    65 msgstr ""
    66 
    67 #: includes/class-wccaf-whatsapp.php:56
    68 msgid "Invalid phone number for WhatsApp delivery."
    69 msgstr ""
    70 
    71 #: includes/class-wccaf-whatsapp.php:66
    72 msgid ""
    73 "WhatsApp Gateway not configured. Please enter your API credentials in plugin "
    74 "settings."
    75 msgstr ""
    76 
    77 #: includes/class-wccaf-whatsapp.php:94
    78 msgid "Unsupported WhatsApp provider."
    79 msgstr ""
    80 
    81 #: includes/class-wccaf-whatsapp.php:142 includes/class-wccaf-whatsapp.php:214
    82 #: includes/class-wccaf-checkout.php:405
    83 msgid "Code sent! Please check your WhatsApp."
    84 msgstr ""
    85 
    86 #: includes/class-wccaf-whatsapp.php:159
    87 #, php-format
    88 msgid "Error while sending message via BeraLabs Gateway. Response code: %d"
    89 msgstr ""
    90 
    91 #: includes/class-wccaf-whatsapp.php:222
    92 #, php-format
    93 msgid "Error while sending WhatsApp message. Response code: %d"
    94 msgstr ""
    95 
    96 #: includes/class-wccaf-checkout.php:115 includes/class-wccaf-checkout.php:394
     31#: includes/class-wccaf-admin.php:164
     32msgid "COD & WhatsApp Anti-Fraud Analysis"
     33msgstr ""
     34
     35#: includes/class-wccaf-admin.php:196
     36msgid "This order did not use Cash on Delivery payment method."
     37msgstr ""
     38
     39#: includes/class-wccaf-admin.php:214
     40msgid "WhatsApp Verification Status:"
     41msgstr ""
     42
     43#: includes/class-wccaf-admin.php:216
     44msgid "WHITELISTED CUSTOMER (VIP)"
     45msgstr ""
     46
     47#: includes/class-wccaf-admin.php:218
     48msgid "VERIFIED VIA WHATSAPP"
     49msgstr ""
     50
     51#: includes/class-wccaf-admin.php:220
     52msgid "BYPASSED (BELOW THRESHOLD)"
     53msgstr ""
     54
     55#: includes/class-wccaf-admin.php:222
     56msgid "NOT VERIFIED"
     57msgstr ""
     58
     59#: includes/class-wccaf-admin.php:227
     60msgid "Risk Score:"
     61msgstr ""
     62
     63#: includes/class-wccaf-admin.php:233
     64msgid "Verified Phone Number:"
     65msgstr ""
     66
     67#: includes/class-wccaf-admin.php:240
     68msgid "Verification Date and Time:"
     69msgstr ""
     70
     71#: includes/class-wccaf-checkout.php:115 includes/class-wccaf-checkout.php:529
    9772msgid ""
    9873"WhatsApp Gateway not configured. Please enter API credentials in plugin "
    … …  
    10075msgstr ""
    10176
    102 #: includes/class-wccaf-checkout.php:117 includes/class-wccaf-checkout.php:360
     77#: includes/class-wccaf-checkout.php:117 includes/class-wccaf-checkout.php:482
    10378msgid "Please enter your phone number in the billing form first."
    10479msgstr ""
    … …  
    11287msgstr ""
    11388
    114 #: includes/class-wccaf-checkout.php:120 includes/class-wccaf-checkout.php:289
     89#: includes/class-wccaf-checkout.php:120 includes/class-wccaf-checkout.php:293
    11590msgid "Resend WhatsApp Code"
    11691msgstr ""
    … …  
    152127msgstr ""
    153128
     129#: includes/class-wccaf-checkout.php:130 includes/class-wccaf-checkout.php:600
     130#: includes/class-wccaf-otp-manager.php:339
     131msgid "Number verified successfully!"
     132msgstr ""
     133
    154134#: includes/class-wccaf-checkout.php:159
    155135msgid "Cash on Delivery verification after order confirmation"
    … …  
    176156msgstr ""
    177157
    178 #: includes/class-wccaf-checkout.php:190 includes/class-wccaf-checkout.php:295
     158#: includes/class-wccaf-checkout.php:190 includes/class-wccaf-checkout.php:299
    179159msgid "OTP Code (6 digits)"
    180160msgstr ""
    181161
    182 #: includes/class-wccaf-checkout.php:192 includes/class-wccaf-checkout.php:297
     162#: includes/class-wccaf-checkout.php:192 includes/class-wccaf-checkout.php:302
    183163msgid "Verify Code"
    184164msgstr ""
    185165
    186 #: includes/class-wccaf-checkout.php:239
     166#: includes/class-wccaf-checkout.php:243
    187167msgid "Cash on Delivery WhatsApp Verification"
    188168msgstr ""
    189169
    190 #: includes/class-wccaf-checkout.php:244
     170#: includes/class-wccaf-checkout.php:248
    191171msgid "Trusted Customer (Whitelist)"
    192172msgstr ""
    193173
    194 #: includes/class-wccaf-checkout.php:250
     174#: includes/class-wccaf-checkout.php:254
    195175#, php-format
    196176msgid ""
    … …  
    198178msgstr ""
    199179
    200 #: includes/class-wccaf-checkout.php:260
     180#: includes/class-wccaf-checkout.php:264
    201181msgid "Number Verified via WhatsApp OTP"
    202182msgstr ""
    203183
    204 #: includes/class-wccaf-checkout.php:266
     184#: includes/class-wccaf-checkout.php:270
    205185#, php-format
    206186msgid "Order #%1$d has passed WhatsApp verification for phone number %2$s."
    207187msgstr ""
    208188
    209 #: includes/class-wccaf-checkout.php:280
     189#: includes/class-wccaf-checkout.php:284
    210190#, php-format
    211191msgid "Enter the OTP code sent via WhatsApp to %s to confirm verification."
    212192msgstr ""
    213193
    214 #: includes/class-wccaf-checkout.php:319
     194#: includes/class-wccaf-checkout.php:324
     195msgid "WooCommerce is not available."
     196msgstr ""
     197
     198#: includes/class-wccaf-checkout.php:332
     199msgid "Invalid order specified."
     200msgstr ""
     201
     202#: includes/class-wccaf-checkout.php:339
     203msgid "The specified order does not use Cash on Delivery."
     204msgstr ""
     205
     206#: includes/class-wccaf-checkout.php:370
     207msgid "Permission denied or invalid order verification key."
     208msgstr ""
     209
     210#: includes/class-wccaf-checkout.php:384
     211msgid ""
     212"The verified phone number does not match the billing phone number of this "
     213"order."
     214msgstr ""
     215
     216#: includes/class-wccaf-checkout.php:408
    215217msgid "Cash on Delivery payment is not available for this address."
    216218msgstr ""
    217219
    218 #: includes/class-wccaf-checkout.php:326
     220#: includes/class-wccaf-checkout.php:415
    219221msgid "VIP/Trusted customer: OTP verification not required."
    220222msgstr ""
    221223
    222 #: includes/class-wccaf-checkout.php:367
     224#: includes/class-wccaf-checkout.php:453
     225msgid "Order is already verified."
     226msgstr ""
     227
     228#: includes/class-wccaf-checkout.php:489
    223229msgid ""
    224230"Cash on Delivery is not authorized for this contact. Please select another "
    … …  
    226232msgstr ""
    227233
    228 #: includes/class-wccaf-checkout.php:380
     234#: includes/class-wccaf-checkout.php:515
    229235msgid "Phone number verified automatically (Trusted Whitelist Customer)."
    230236msgstr ""
    231237
    232 #: includes/class-wccaf-checkout.php:426
     238#: includes/class-wccaf-checkout.php:541 includes/class-wccaf-whatsapp.php:144
     239#: includes/class-wccaf-whatsapp.php:199
     240msgid "Code sent! Please check your WhatsApp."
     241msgstr ""
     242
     243#: includes/class-wccaf-checkout.php:544 includes/class-wccaf-whatsapp.php:155
     244#: includes/class-wccaf-whatsapp.php:209
     245msgid ""
     246"Could not deliver WhatsApp verification code. Please check your phone number "
     247"and try again."
     248msgstr ""
     249
     250#: includes/class-wccaf-checkout.php:580
    233251msgid "Missing or invalid phone number."
    234252msgstr ""
    235253
    236 #: includes/class-wccaf-checkout.php:430
     254#: includes/class-wccaf-checkout.php:584
    237255msgid "Please enter a valid 6-digit OTP code."
    238256msgstr ""
    239257
    240 #: includes/class-wccaf-checkout.php:479 includes/class-wccaf-checkout.php:554
    241 #: includes/class-wccaf-checkout.php:628
     258#: includes/class-wccaf-checkout.php:638 includes/class-wccaf-checkout.php:718
     259#: includes/class-wccaf-checkout.php:797
    242260msgid ""
    243261"Cash on Delivery is not available for this order. Please choose an "
    … …  
    245263msgstr ""
    246264
    247 #: includes/class-wccaf-checkout.php:493 includes/class-wccaf-checkout.php:568
    248 #: includes/class-wccaf-checkout.php:641
     265#: includes/class-wccaf-checkout.php:652 includes/class-wccaf-checkout.php:732
     266#: includes/class-wccaf-checkout.php:810
    249267#, php-format
    250268msgid ""
    … …  
    253271msgstr ""
    254272
    255 #: includes/class-wccaf-checkout.php:509 includes/class-wccaf-checkout.php:582
    256 #: includes/class-wccaf-checkout.php:654
     273#: includes/class-wccaf-checkout.php:668 includes/class-wccaf-checkout.php:746
     274#: includes/class-wccaf-checkout.php:823
    257275msgid ""
    258276"Please enter your phone number in the billing form first for Cash on "
    … …  
    260278msgstr ""
    261279
    262 #: includes/class-wccaf-checkout.php:530 includes/class-wccaf-checkout.php:601
    263 #: includes/class-wccaf-checkout.php:672
     280#: includes/class-wccaf-checkout.php:691 includes/class-wccaf-checkout.php:767
     281#: includes/class-wccaf-checkout.php:841
    264282msgid ""
    265283"WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. "
    … …  
    268286msgstr ""
    269287
    270 #: includes/class-wccaf-admin.php:96
    271 msgid "COD & WhatsApp Anti-Fraud Analysis"
    272 msgstr ""
    273 
    274 #: includes/class-wccaf-admin.php:127
    275 msgid "This order did not use Cash on Delivery payment method."
    276 msgstr ""
    277 
    278 #: includes/class-wccaf-admin.php:145
    279 msgid "WhatsApp Verification Status:"
    280 msgstr ""
    281 
    282 #: includes/class-wccaf-admin.php:147
    283 msgid "WHITELISTED CUSTOMER (VIP)"
    284 msgstr ""
    285 
    286 #: includes/class-wccaf-admin.php:149
    287 msgid "VERIFIED VIA WHATSAPP"
    288 msgstr ""
    289 
    290 #: includes/class-wccaf-admin.php:151
    291 msgid "BYPASSED (BELOW THRESHOLD)"
    292 msgstr ""
    293 
    294 #: includes/class-wccaf-admin.php:153
    295 msgid "NOT VERIFIED"
    296 msgstr ""
    297 
    298 #: includes/class-wccaf-admin.php:158
    299 msgid "Risk Score:"
    300 msgstr ""
    301 
    302 #: includes/class-wccaf-admin.php:164
    303 msgid "Verified Phone Number:"
    304 msgstr ""
    305 
    306 #: includes/class-wccaf-admin.php:171
    307 msgid "Verification Date and Time:"
     288#: includes/class-wccaf-checkout.php:869
     289msgid ""
     290"Cash on Delivery order cannot be placed without completing WhatsApp OTP "
     291"phone verification."
     292msgstr ""
     293
     294#: includes/class-wccaf-otp-manager.php:113
     295#, php-format
     296msgid ""
     297"You have exceeded the maximum number of attempts (%1$d requests). Please try "
     298"again in %2$d minutes."
     299msgstr ""
     300
     301#: includes/class-wccaf-otp-manager.php:136
     302#, php-format
     303msgid "Too many requests from this IP address. Please try again in %d minutes."
     304msgstr ""
     305
     306#: includes/class-wccaf-otp-manager.php:255
     307msgid "Phone number or OTP code not provided."
     308msgstr ""
     309
     310#: includes/class-wccaf-otp-manager.php:273
     311msgid "OTP code expired or invalid. Please request a new one."
     312msgstr ""
     313
     314#: includes/class-wccaf-otp-manager.php:291
     315msgid "OTP code expired. Please request a new one."
     316msgstr ""
     317
     318#: includes/class-wccaf-otp-manager.php:305
     319#: includes/class-wccaf-otp-manager.php:352
     320msgid ""
     321"Maximum number of incorrect attempts exceeded. Please request a new code."
     322msgstr ""
     323
     324#: includes/class-wccaf-otp-manager.php:366
     325#, php-format
     326msgid "Incorrect OTP code. Attempts remaining: %d"
    308327msgstr ""
    309328
    … …  
    316335msgstr ""
    317336
    318 #: includes/class-wccaf-settings.php:53
     337#: includes/class-wccaf-settings.php:50
    319338msgid "WooCommerce COD Anti-Fraud Settings"
    320339msgstr ""
    321340
    322 #: includes/class-wccaf-settings.php:55
     341#: includes/class-wccaf-settings.php:52
    323342msgid ""
    324343"Configure WhatsApp OTP verification and risk score management for Cash on "
    … …  
    327346msgstr ""
    328347
    329 #: includes/class-wccaf-settings.php:60
     348#: includes/class-wccaf-settings.php:57
    330349msgid "OTP Verification Mode (Pre-Checkout Blocking)"
    331350msgstr ""
    332351
    333 #: includes/class-wccaf-settings.php:61
     352#: includes/class-wccaf-settings.php:58
    334353msgid ""
    335354"WhatsApp OTP verification occurs directly in cart/checkout before placing "
    … …  
    337356msgstr ""
    338357
    339 #: includes/class-wccaf-settings.php:66
     358#: includes/class-wccaf-settings.php:63
    340359msgid "Always Required (All Cash on Delivery Orders)"
    341360msgstr ""
    342361
    343 #: includes/class-wccaf-settings.php:67
     362#: includes/class-wccaf-settings.php:64
    344363msgid "Conditional (Based on Risk Score or Cart Total)"
    345364msgstr ""
    346365
    347 #: includes/class-wccaf-settings.php:72
     366#: includes/class-wccaf-settings.php:69
    348367msgid "Risk Score Threshold (0-100)"
    349368msgstr ""
    350369
    351 #: includes/class-wccaf-settings.php:73
     370#: includes/class-wccaf-settings.php:70
    352371msgid ""
    353372"Require OTP if calculated risk score exceeds this value (only applied in "
    … …  
    355374msgstr ""
    356375
    357 #: includes/class-wccaf-settings.php:85
     376#: includes/class-wccaf-settings.php:82
    358377msgid "Minimum Cart Amount for OTP (€)"
    359378msgstr ""
    360379
    361 #: includes/class-wccaf-settings.php:86
     380#: includes/class-wccaf-settings.php:83
    362381msgid ""
    363382"Require OTP only if cart total equals or exceeds this amount (0 for no "
    … …  
    365384msgstr ""
    366385
    367 #: includes/class-wccaf-settings.php:97
     386#: includes/class-wccaf-settings.php:94
    368387msgid "Maximum COD Cart Threshold (€)"
    369388msgstr ""
    370389
    371 #: includes/class-wccaf-settings.php:98
     390#: includes/class-wccaf-settings.php:95
    372391msgid "Maximum cart value above which the high-threshold rule is applied."
    373392msgstr ""
    374393
    375 #: includes/class-wccaf-settings.php:109
     394#: includes/class-wccaf-settings.php:106
    376395msgid "Action Above Maximum Threshold"
    377396msgstr ""
    378397
    379 #: includes/class-wccaf-settings.php:110
     398#: includes/class-wccaf-settings.php:107
    380399msgid "Action to take when cart total exceeds the maximum threshold."
    381400msgstr ""
    382401
    383 #: includes/class-wccaf-settings.php:115
     402#: includes/class-wccaf-settings.php:112
    384403msgid "Require WhatsApp OTP Verification"
    385404msgstr ""
    386405
    387 #: includes/class-wccaf-settings.php:116
     406#: includes/class-wccaf-settings.php:113
    388407msgid "Disable Cash on Delivery Payment Method"
    389408msgstr ""
    390409
    391 #: includes/class-wccaf-settings.php:121
     410#: includes/class-wccaf-settings.php:118
    392411msgid "Phone / Email Blacklist"
    393412msgstr ""
    394413
    395 #: includes/class-wccaf-settings.php:122
     414#: includes/class-wccaf-settings.php:119
    396415msgid ""
    397416"Enter phone numbers or emails to block from Cash on Delivery (one per line "
    … …  
    399418msgstr ""
    400419
    401 #: includes/class-wccaf-settings.php:130
     420#: includes/class-wccaf-settings.php:127
    402421msgid "Phone / Email Whitelist (VIP)"
    403422msgstr ""
    404423
    405 #: includes/class-wccaf-settings.php:131
     424#: includes/class-wccaf-settings.php:128
    406425msgid ""
    407426"Enter trusted phone numbers or emails to automatically bypass OTP "
    … …  
    409428msgstr ""
    410429
    411 #: includes/class-wccaf-settings.php:139
     430#: includes/class-wccaf-settings.php:136
    412431msgid "Max OTP Requests Limit"
    413432msgstr ""
    414433
    415 #: includes/class-wccaf-settings.php:140
     434#: includes/class-wccaf-settings.php:137
    416435msgid "Maximum number of OTP requests allowed before temporary lock."
    417436msgstr ""
    418437
    419 #: includes/class-wccaf-settings.php:151
     438#: includes/class-wccaf-settings.php:148
    420439msgid "Rate Limit Window (minutes)"
    421440msgstr ""
    422441
    423 #: includes/class-wccaf-settings.php:152
     442#: includes/class-wccaf-settings.php:149
    424443msgid "Validity period for request limit in minutes."
    425444msgstr ""
    426445
    427 #: includes/class-wccaf-settings.php:163
     446#: includes/class-wccaf-settings.php:160
    428447msgid "WhatsApp Provider"
    429448msgstr ""
    430449
    431 #: includes/class-wccaf-settings.php:164
     450#: includes/class-wccaf-settings.php:161
    432451msgid "Select the WhatsApp provider for sending OTP codes."
    433452msgstr ""
    434453
    435 #: includes/class-wccaf-settings.php:169
     454#: includes/class-wccaf-settings.php:166
    436455msgid "BeraLabs Gateway (Proprietary)"
    437456msgstr ""
    438457
    439 #: includes/class-wccaf-settings.php:170
     458#: includes/class-wccaf-settings.php:167
    440459msgid "UltraMsg API"
    441460msgstr ""
    442461
    443 #: includes/class-wccaf-settings.php:175
     462#: includes/class-wccaf-settings.php:172
    444463msgid "BeraLabs Gateway Endpoint"
    445464msgstr ""
    446465
    447 #: includes/class-wccaf-settings.php:176
     466#: includes/class-wccaf-settings.php:173
    448467msgid ""
    449468"Endpoint URL for BeraLabs WhatsApp OTP microservice (e.g., https://"
    … …  
    451470msgstr ""
    452471
    453 #: includes/class-wccaf-settings.php:184
     472#: includes/class-wccaf-settings.php:181
    454473msgid "BeraLabs API Key"
    455474msgstr ""
    456475
    457 #: includes/class-wccaf-settings.php:185
     476#: includes/class-wccaf-settings.php:182
    458477msgid ""
    459478"Enter the secret API key (x-api-key) for authentication with BeraLabs "
    … …  
    461480msgstr ""
    462481
    463 #: includes/class-wccaf-settings.php:185
     482#: includes/class-wccaf-settings.php:182
    464483msgid "Request WhatsApp API Key"
    465484msgstr ""
    466485
    467 #: includes/class-wccaf-settings.php:193
     486#: includes/class-wccaf-settings.php:190
    468487msgid "UltraMsg Instance ID"
    469488msgstr ""
    470489
    471 #: includes/class-wccaf-settings.php:194
     490#: includes/class-wccaf-settings.php:191
    472491msgid ""
    473492"Enter the Instance ID provided by UltraMsg (e.g., instance12345). Only used "
    … …  
    475494msgstr ""
    476495
    477 #: includes/class-wccaf-settings.php:201
     496#: includes/class-wccaf-settings.php:198
    478497msgid "UltraMsg API Token"
    479498msgstr ""
    480499
    481 #: includes/class-wccaf-settings.php:202
     500#: includes/class-wccaf-settings.php:199
    482501msgid ""
    483502"Enter the secret API Token provided by UltraMsg. Only used if UltraMsg "
    … …  
    485504msgstr ""
    486505
    487 #: includes/class-wccaf-settings.php:209
     506#: includes/class-wccaf-settings.php:206
    488507msgid "OTP Expiry (minutes)"
    489508msgstr ""
    490509
    491 #: includes/class-wccaf-settings.php:210
     510#: includes/class-wccaf-settings.php:207
    492511msgid "Validity duration of the generated OTP code."
    493512msgstr ""
    494513
    495 #: includes/class-wccaf-settings.php:221
     514#: includes/class-wccaf-settings.php:218
    496515msgid "Maximum OTP Attempts"
    497516msgstr ""
    498517
    499 #: includes/class-wccaf-settings.php:222
     518#: includes/class-wccaf-settings.php:219
    500519msgid "Number of incorrect code attempts allowed before invalidation."
    501520msgstr ""
    502521
    503 #: includes/class-wccaf-settings.php:233
     522#: includes/class-wccaf-settings.php:230
    504523msgid "WhatsApp Message Template"
    505524msgstr ""
    506525
    507 #: includes/class-wccaf-settings.php:234
     526#: includes/class-wccaf-settings.php:231
    508527msgid "Use {{otp}} as a placeholder for the generated numerical code."
    509528msgstr ""
     529
     530#: includes/class-wccaf-settings.php:264
     531msgid "You do not have permission to modify these settings."
     532msgstr ""
     533
     534#: includes/class-wccaf-whatsapp.php:59
     535msgid "Invalid phone number for WhatsApp delivery."
     536msgstr ""
     537
     538#: includes/class-wccaf-whatsapp.php:69
     539msgid ""
     540"WhatsApp Gateway not configured. Please enter your API credentials in plugin "
     541"settings."
     542msgstr ""
     543
     544#: includes/class-wccaf-whatsapp.php:93
     545msgid "Unsupported WhatsApp provider."
     546msgstr ""
     547
     548#: includes/class-wccaf-whatsapp.php:133
     549msgid "Unable to connect to WhatsApp Gateway. Please try again later."
     550msgstr ""
     551
     552#: includes/class-wccaf-whatsapp.php:188
     553msgid "Unable to connect to WhatsApp provider. Please try again later."
     554msgstr ""
     555
     556#: woo-cod-antifraud.php:131
     557#, php-format
     558msgid "WooCommerce COD Anti-Fraud requires %s to be installed and active."
     559msgstr ""
  • cod-anti-fraud-for-woocommerce/trunk/readme.txt

    r3778566 r3798076  
    22Contributors: beralabs
    33Donate link: https://beralabs.it
    4 Tags: woocommerce, cash on delivery, anti fraud, otp, whatsapp
     4Tags: nachnahme, contra reembolso, cash on delivery, anti fraud, woocommerce
    55Requires at least: 6.0
    66Tested up to: 7.1
    … …  
    2828* **Order Meta & Admin Details:** Transparent risk scores and verification timestamps displayed directly inside WooCommerce order details.
    2929* **PHP 8.x & HPOS Certified:** Fully compatible and tested with PHP 8.0-8.3 and WooCommerce High-Performance Order Storage (HPOS).
     30* **Multi-language & Internationalization (i18n):** Native support for French (France, Belgique, Suisse, Maghreb - fr_FR), German (Deutschland, Österreich, Schweiz - de_DE), Spanish (España y Latinoamérica - es_ES), Italian (it_IT), and English (en_US / en_GB).
     31
     32---
     33
     34### Descripción en Español (Pago Contra Reembolso & Contra Entrega)
     35
     36**COD Anti-Fraud for WooCommerce** es la solución definitiva de prevención de fraude y verificación para tiendas online que ofrecen **pago contra reembolso** (España) o **pago contra entrega** (México, Colombia, Chile, Perú, Argentina y Latinoamérica).
     37
     38El pago contra reembolso suele sufrir altas tasas de rechazo, paquetes devueltos no reclamados, pedidos falsos y pérdidas logísticas elevadas. Este plugin elimina estos problemas validando la autenticidad del cliente antes de confirmar el pedido mediante **verificación OTP por WhatsApp** y un **motor de evaluación de riesgo**.
     39
     40#### Características Principales en Español:
     41* **Verificación OTP por WhatsApp:** Envía automáticamente un código numérico de 6 dígitos al teléfono móvil del comprador vía WhatsApp. El cliente debe validar el código en el checkout antes de poder completar el pedido contra entrega.
     42* **Motor Antifraude Inteligente:** Calcula una puntuación de riesgo (0-100) analizando compras previas canceladas o devueltas, pedidos como invitado y valor del carrito.
     43* **Bloqueo Pre-Checkout Infranqueable:** Protección bidireccional (frontend y backend) que impide finalizar pedidos contra reembolso sin confirmación telefónica válida.
     44* **Umbrales Máximos y Reglas de Importe:** Define importes mínimos o máximos para permitir el pago contra reembolso y desactívalo o exige OTP cuando el carrito supere el límite deseado.
     45* **Gestión de Listas Negras y Listas Blancas (VIP):** Bloquea automáticamente números de teléfono o correos sospechosos y exime de verificación a clientes recurrentes de máxima confianza.
     46* **Prevención de Abusos y Rate Limiting:** Limita los intentos y las solicitudes por dirección IP y teléfono para evitar costes innecesarios de mensajería y ataques de fuerza bruta.
     47* **Integración con Pasarelas WhatsApp:** Compatible de forma nativa con UltraMsg y BeraLab WhatsApp Gateway, fácilmente ampliable a otras APIs.
     48* **Totalmente Localizado en Español:** Interfaz de usuario en el checkout y panel de administración 100% traducidos al español (es_ES / es_419).
     49
     50---
     51
     52### Deutsche Beschreibung (Nachnahme & Betrugsschutz für WooCommerce)
     53
     54**COD Anti-Fraud for WooCommerce** ist die professionelle Lösung zur **Betrugsprävention** und Reduzierung von Annahmeverweigerungen für Online-Shops im DACH-Raum (Deutschland, Österreich, Schweiz), die **Nachnahme** als Zahlungsmethode anbieten.
     55
     56Der Kauf per Nachnahme birgt für Händler erhebliche finanzielle Risiken: Unzustellbare Sendungen, Spaßbestellungen, unvollständige Adressen und hohe Kosten für Rücksendungen belasten die Marge empfindlich. Dieses Plugin bietet effektiven **Betrugsschutz für WooCommerce**, indem es betrügerische Bestellungen vorab filtert, Händlern hilft, die **Retourenquote reduzieren** zu können, und eine nahtlose **OTP-Verifizierung via WhatsApp & SMS** direkt im Kassenbereich (Pre-Checkout) erzwingt.
     57
     58#### Wichtige Funktionen für den DACH-Markt:
     59* **Nachnahme absichern:** Schützen Sie Ihren Shop vor unüberlegten oder böswilligen Nachnahme-Bestellungen und minimieren Sie logistische Ausfallkosten.
     60* **Retourenquote reduzieren:** Durch die Echtzeit-Verifizierung der Mobilfunknummer sinken unzustellbare Pakete und Retouren drastisch (um bis zu 85 %).
     61* **OTP-Verifizierung via WhatsApp & SMS:** Der Kunde erhält direkt beim Checkout einen 6-stelligen Verifizierungscode per WhatsApp. Ohne gültige Bestätigung kann die Nachnahme-Bestellung nicht abgeschlossen werden.
     62* **Nachnahmegebühr & Schwellenwerte:** Schützen Sie sich vor hohen Nachnahmegebühren und logistischen Verlusten durch konfigurierbare Mindest- und Höchstbeträge im Warenkorb.
     63* **Intelligente Risikobewertung (0-100):** Analysiert Gastbestellungen, frühere Stornierungen und Warenkorbwerte zur automatischen Risikobewertung.
     64* **Sperrliste & VIP-Kunden (Blacklist/Whitelist):** Blockieren Sie verdächtige Rufnummern oder E-Mails und befreien Sie verifizierte Stammkunden von wiederholten Prüfungen.
     65* **DSGVO-freundlich & HPOS-zertifiziert:** Vollständige Unterstützung für WooCommerce High-Performance Order Storage (HPOS) und modernste PHP 8.x-Laufzeiten.
     66* **Vollständige deutsche Lokalisierung:** Sowohl das Checkout-Frontend als auch das gesamte Admin-Dashboard sind in fehlerfreiem Deutsch (de_DE) verfügbar.
     67
     68---
     69
     70### Description en Français (Paiement à la Livraison & Contre-Remboursement WooCommerce)
     71
     72**COD Anti-Fraud for WooCommerce** est la solution de référence pour la prévention de la fraude et la sécurisation des boutiques en ligne proposant le **paiement à la livraison** (France, Belgique, Suisse et Maghreb : Maroc, Algérie, Tunisie).
     73
     74Le paiement à la livraison (COD) engendre fréquemment des commandes fantômes, des adresses erronées et un **taux de retour colis** critique qui grève la rentabilité logistique des e-commerçants. Ce plugin d'**anti-fraude e-commerce** protège vos marges en introduisant une **vérification commande WhatsApp** par code OTP bloquante au panier et au checkout, ainsi qu'un calcul dynamique du risque d'impayé.
     75
     76#### Fonctionnalités Clés pour le Marché Francophone :
     77* **Vérification Commande WhatsApp par OTP :** Envoi instantané d'un code de validation à 6 chiffres sur le WhatsApp du client avant la validation du paiement.
     78* **Sécurisation du Contre-Remboursement WooCommerce :** Bloque les commandes suspectes et empêche la finalisation d'un panier en contre-remboursement sans validation mobile préalable.
     79* **Gestion des Frais de Contre-Remboursement & Seuils :** Définissez des paniers minimum et maximum pour amortir ou compenser les **frais de contre-remboursement** et désactivez automatiquement le COD sur les commandes à haut risque.
     80* **Réduction Drastique du Taux de Retour Colis :** Élimine jusqu'à 85 % des colis refusés ou non réclamés à la livraison grâce à la confirmation téléphonique active de l'acheteur.
     81* **Moteur d'Évaluation des Risques (0-100) :** Analyse l'historique d'annulation, les commandes en mode invité et le montant du panier pour isoler les profils frauduleux.
     82* **Gestion des Listes Noires et Listes Blanches (VIP) :** Bannissez les numéros et e-mails récidivistes, tout en exemptant vos clients fidèles de la vérification OTP.
     83* **Haute Compatibilité HPOS & PHP 8.x :** Certifié compatible avec WooCommerce High-Performance Order Storage (HPOS) et PHP 7.4 à 8.3+.
     84* **Traduction Complète en Français (fr_FR) :** Interface client fluide au checkout et panneau d'administration traduits à 100 % en français pour un parcours utilisateur sans friction.
    3085
    3186== External Services ==
    … …  
    68123Yes, guest checkout is fully supported and analyzed with higher risk evaluation weights.
    69124
     125= ¿Cómo reduce este plugin las devoluciones en pago contra reembolso / contra entrega? =
     126Al exigir que el cliente verifique su número de teléfono mediante un código OTP recibido en su cuenta de WhatsApp activa en tiempo real, se filtran de raíz los números de teléfono falsos, compras impulsivas que luego no se recogen y direcciones fraudulentas. Esto reduce las entregas fallidas hasta en un 85%.
     127
     128= ¿Está disponible en idioma español? =
     129Sí, el plugin incluye traducciones nativas y completas en español (es_ES) tanto para los mensajes y botones mostrados al cliente en la pantalla de pago (checkout) como para todo el panel de control y configuración del comerciante.
     130
     131= Wie hilft dieses Plugin, die Retourenquote bei Nachnahme zu reduzieren? =
     132Durch die verpflichtende OTP-Verifizierung via WhatsApp & SMS vor dem Kaufabschluss werden gefälschte Adressen und Spaßbestellungen zuverlässig eliminiert. Händler im DACH-Raum können so ihre Retourenquote reduzieren und unnötige Nachnahmegebühr-Verluste sowie Rückversandkosten effektiv vermeiden.
     133
     134= Ist das Plugin vollständig auf Deutsch verfügbar? =
     135Ja, das Plugin enthält eine vollständige und professionelle Lokalisierung auf Deutsch (de_DE) für das Kassen-Frontend sowie für alle Menüs und Optionen im WooCommerce-Adminbereich.
     136
    70137== Screenshots ==
    71138
    … …  
    82149* Enhancement: Protezione da brute force e rate limiting transazionale su Transient per le richieste OTP WhatsApp.
    83150* Improvement: Piena conformità WooCommerce HPOS (High-Performance Order Storage) e capability check 'manage_woocommerce' nell'admin backend.
     151* Localization: Obiettivo strategico OBJ-08 completato - Internazionalizzazione completa con supporto per lingua spagnola (es_ES / LatAm), generazione template POT aggiornato, catalogo PO/MO compilato e allineamento formale text-domain standard.
    84152
    85153= 2.0.1 =
    … …  
    109177== Upgrade Notice ==
    110178
     179= 2.0.2 =
     180Recommended upgrade: complete Spanish/LatAm localization (OBJ-08), IDOR prevention, HPOS certified compatibility, and transactional rate limiting.
     181
    111182= 2.0.1 =
    112183Recommended upgrade for all users: adds WhatsApp OTP checkout flow, strict anti-bypass validation, UX optimizations, certified HPOS compatibility, and passed E2E test validations.
  • cod-anti-fraud-for-woocommerce/trunk/woo-cod-antifraud.php

    r3778566 r3798076  
    77 * Author: BeraLab
    88 * Author URI: https://beralabs.it
    9  * Text Domain: woo-cod-antifraud
     9 * Text Domain: cod-anti-fraud-for-woocommerce
    1010 * Domain Path: /languages
    1111 * Requires at least: 6.0
    … …  
    9292                // Load Translations
    9393                // phpcs:ignore PluginCheck.CodeAnalysis.DiscouragedFunctions.load_plugin_textdomainFound
    94                 load_plugin_textdomain( 'woo-cod-antifraud', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
     94                load_plugin_textdomain( 'cod-anti-fraud-for-woocommerce', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
    9595
    9696                // Include internal components
    … …  
    129129                                sprintf(
    130130                                        /* translators: %s: WooCommerce plugin link */
    131                                         __( 'WooCommerce COD Anti-Fraud requires %s to be installed and active.', 'woo-cod-antifraud' ),
     131                                        __( 'WooCommerce COD Anti-Fraud requires %s to be installed and active.', 'cod-anti-fraud-for-woocommerce' ),
    132132                                        '<a href="https://wordpress.org/plugins/woocommerce/" target="_blank" rel="noopener noreferrer">WooCommerce</a>'
    133133                                ),
    … …  
    168168                                'otp_expiry_minutes'       => 5,
    169169                                'max_attempts'             => 3,
    170                                 'custom_message_template'  => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'woo-cod-antifraud' ),
     170                                'custom_message_template'  => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' ),
    171171                        );
    172172                        update_option( 'wc_cod_antifraud_settings', $defaults );
Note: See TracChangeset for help on using the changeset viewer.