Changeset 2735818
- Timestamp:
- 06/01/2022 04:43:19 PM (2 years ago)
- Location:
- comprobante-de-pago-peru
- Files:
-
- 13 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
comprobante-de-pago-peru/trunk/README.txt
r2724863 r2735818 93 93 == Changelog == 94 94 95 96 97 95 98 = 0.1.4 (16/05/2022) = 96 99 Fix: validando versión WC 6.5.1 -
comprobante-de-pago-peru/trunk/comprobante-de-pago-peru.php
r2724863 r2735818 10 10 * Plugin URI: https://renzotejada.com/comprobante-de-pago-peru/ 11 11 * Description: Payment Receipt for Peru where the option to choose bill or Invoice or others is added. 12 * Version: 0.1. 412 * Version: 0.1. 13 13 * Author: Renzo Tejada 14 14 * Author URI: https://renzotejada.com/ -
comprobante-de-pago-peru/trunk/comprobante_checkout.php
r2667402 r2735818 33 33 34 34 woocommerce_form_field( 'billing_dni', array( 35 'type' => ' number',35 'type' => '', 36 36 'class' => array( 'form-row-wide' ), 37 37 'label' => __('DNI', 'rt-tipo-comprobante'), … … 64 64 global $wp; 65 65 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); 68 68 wp_enqueue_script('comprobante_script'); 69 69 } … … 101 101 wc_add_notice('<b>' . __('Please enter your DNI', 'rt-tipo-comprobante') . '</b> is a required field.', 'error'); 102 102 } 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) { 106 106 wc_add_notice('<b>' . __('Please enter 8 digits of your DNI', 'rt-tipo-comprobante') . '</b> is a required field.', 'error'); 107 107 } 108 109 110 108 111 } 109 112 } … … 111 114 if($_POST['billing_comprobante'] == 'factura') { 112 115 113 if ( ! $_POST['billing_ruc'] ) { 116 $ruc = sanitize_text_field($_POST['billing_ruc']); 117 if ( ! $ruc ) { 114 118 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 115 127 } 116 128
Note: See TracChangeset
for help on using the changeset viewer.