Plugin Directory

Changeset 2735818

Timestamp:
06/01/2022 04:43:19 PM (2 years ago)
Author:
renzotejada
Message:

fix: v0.1.5

Location:
comprobante-de-pago-peru
Files:
13 added
3 edited

Legend:

Unmodified
Added
Removed
  • comprobante-de-pago-peru/trunk/README.txt

    r2724863 r2735818  
    9393== Changelog ==
    9494
     95
     96
     97
    9598= 0.1.4 (16/05/2022) =
    9699Fix: validando versión WC 6.5.1
  • comprobante-de-pago-peru/trunk/comprobante-de-pago-peru.php

    r2724863 r2735818  
    1010 * Plugin URI:        https://renzotejada.com/comprobante-de-pago-peru/
    1111 * Description:       Payment Receipt for Peru where the option to choose bill or Invoice or others is added.
    12  * Version:           0.1.4
     12 * Version:           0.1.
    1313 * Author:            Renzo Tejada
    1414 * Author URI:        https://renzotejada.com/
  • comprobante-de-pago-peru/trunk/comprobante_checkout.php

    r2667402 r2735818  
    3333
    3434    woocommerce_form_field( 'billing_dni', array(
    35         'type' => 'number',
     35        'type' => '',
    3636        'class' => array( 'form-row-wide' ),
    3737        'label' => __('DNI', 'rt-tipo-comprobante'),
     
    6464        global $wp;
    6565        if ( is_checkout() && empty( $wp->query_vars['order-received'] ) ) {
    66 //                wp_register_script('comprobante_script', plugins_url('js/comprobante.js', __FILE__), array(), Version_RT_Tipo_Comprobante, true);
    67                 wp_register_script('comprobante_script', plugins_url('js/comprobante.js', __FILE__), array(), 10, true);
     66                wp_register_script('comprobante_script', plugins_url('js/comprobante.js', __FILE__), array(), Version_RT_Tipo_Comprobante, true);
     67                wp_register_script('comprobante_script', plugins_url('js/comprobante.js', __FILE__), array(), 10, true);
    6868                wp_enqueue_script('comprobante_script');
    6969        }
     
    101101            wc_add_notice('<b>' . __('Please enter your DNI', 'rt-tipo-comprobante') . '</b> is a required field.', 'error');
    102102        }
    103 
    104         if ($_POST['billing_dni']) {
    105             if (strlen($_POST['billing_dni']) < 8) {
     103        $dni = sanitize_text_field($_POST['billing_dni']);
     104        if ($) {
     105            if (strlen($ 8) {
    106106                wc_add_notice('<b>' . __('Please enter 8 digits of your DNI', 'rt-tipo-comprobante') . '</b> is a required field.', 'error');
    107107            }
     108
     109
     110
    108111        }
    109112    }
     
    111114    if($_POST['billing_comprobante'] == 'factura') {
    112115
    113         if ( ! $_POST['billing_ruc'] ) {
     116        $ruc = sanitize_text_field($_POST['billing_ruc']);
     117        if ( ! $ruc ) {
    114118            wc_add_notice( '<b>'. __('Please enter your RUC', 'rt-tipo-comprobante') .'</b> is a required field.', 'error' );
     119
     120
     121
     122
     123
     124
     125
     126
    115127        }
    116128
Note: See TracChangeset for help on using the changeset viewer.