Changeset 3284727
- Timestamp:
- 04/30/2025 08:41:33 AM (11 months ago)
- Location:
- seur/trunk/core/pages
- Files:
-
- 3 edited
-
rates/custom-name-rates.php (modified) (1 diff)
-
rates/limit-price-weight-rates.php (modified) (3 diffs)
-
seur-pickup.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
seur/trunk/core/pages/rates/custom-name-rates.php
r3283287 r3284727 1 1 <?php 2 2 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 3 ?>4 <div class="container">5 <br>6 3 7 <p><?php esc_html_e( 'Custom Names for Seur Rates', 'seur' ); ?></p> 8 9 <hr> 10 11 <?php 12 if ( isset( $_POST['seur_custom_name_rates_post'] ) && 13 ( ! isset( $_POST['seur_custom_name_rates_nonce_field'] ) || 14 ! wp_verify_nonce( sanitize_text_field(wp_unslash($_POST['seur_custom_name_rates_nonce_field'])), 'seur_custom_name_rates' ) ) 4 if ($_SERVER['REQUEST_METHOD'] === 'POST') { 5 if (!isset( $_POST['seur_custom_name_rates_nonce_field'] ) || 6 !wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['seur_custom_name_rates_nonce_field'])), 'seur_custom_name_rates') 15 7 ) { 16 8 print 'Sorry, your nonce did not verify.'; 17 9 exit; 18 10 } 11 } 19 12 20 $products = seur()->get_products();21 if ( isset( $_POST['seur_custom_name_rates_post'] ) ) {22 foreach ($products as $custom_name => $product) {23 $rate_name_value = '';13 $products = seur()->get_products(); 14 if ( isset( $_POST['seur_custom_name_rates_post'] ) ) { 15 foreach ($products as $custom_name => $product) { 16 $rate_name_value = ''; 24 17 25 $field_key = $product['field'] . '_custom_name_field'; 26 if ( isset( $_POST[ $field_key ] ) ) { 27 $rate_name_value = sanitize_text_field( wp_unslash( $_POST[ $field_key ] ) ); 28 } 29 update_option($product['field'] . '_custom_name_field', $rate_name_value); 18 $field_key = $product['field'] . '_custom_name_field'; 19 if ( isset( $_POST[ $field_key ] ) ) { 20 $rate_name_value = sanitize_text_field( wp_unslash( $_POST[ $field_key ] ) ); 30 21 } 22 update_option($product['field'] . '_custom_name_field', $rate_name_value); 31 23 } 32 ?> 33 24 } 25 ?> 26 <div class="container"> 27 <br> 28 <p><?php esc_html_e( 'Custom Names for Seur Rates', 'seur' ); ?></p> 29 <hr> 34 30 <div class="content-loader"> 35 31 <form method="post" action="admin.php?page=seur_rates_prices&tab=custom_rates_name"> -
seur/trunk/core/pages/rates/limit-price-weight-rates.php
r3176965 r3284727 10 10 } 11 11 12 if ($_SERVER['REQUEST_METHOD'] === 'POST') { 13 if ( !isset($_POST['seur_limit_price_weight_rates_nonce_field']) || 14 !wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['seur_limit_price_weight_rates_nonce_field'])), 'seur_limit_price_weight_rates') 15 ) { 16 print 'Sorry, your nonce did not verify.'; 17 exit; 18 } 19 } 12 20 ?> 13 21 <div class="container"> … … 15 23 <p><?php esc_html_e( 'Max package price for apply rate price based on weight', 'seur' ); ?></p> 16 24 <hr> 17 <?php 18 if ( isset( $_POST['seur_limit_price_weight_rates_post'] ) && ( ! isset( $_POST['seur_limit_price_weight_rates_nonce_field'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['seur_limit_price_weight_rates_nonce_field'] ) ), 'seur_limit_price_weight_rates' ) ) ) { 19 print 'Sorry, your nonce did not verify.'; 20 exit; 21 } 22 ?> 23 <div class="content-loader"> 25 <div class="content-loader"> 24 26 <form method="post" action="admin.php?page=seur_rates_prices&tab=limit_price_weight_rates"> 25 27 <table class="form-table"> … … 44 46 ?> 45 47 <input type="hidden" name="seur_limit_price_weight_rates_post" value="true" > 46 <?php wp_nonce_field( 'seur_limit_price_weight_rates', 'seur_limit_price_weight_rates_nonce_field' ); ?>48 <?php wp_nonce_field( 'seur_limit_price_weight_rates', 'seur_limit_price_weight_rates_nonce_field' ); ?> 47 49 </tbody> 48 50 </table> -
seur/trunk/core/pages/seur-pickup.php
r3176965 r3284727 18 18 { 19 19 $error_message = ''; // Variable para almacenar el mensaje de error. 20 21 if ($_SERVER['REQUEST_METHOD'] === 'POST') { 22 if (!isset($_POST['seur_pickup_nonce_field']) || 23 !wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['seur_pickup_nonce_field'])), 'seur_pickup_action') 24 ) { 25 print 'Sorry, your nonce did not verify.'; 26 exit; 27 } 28 } 20 29 21 30 // Procesar solicitudes de recogida o cancelación … … 134 143 wp_nonce_field('seur_pickup_action', 'seur_pickup_nonce_field'); 135 144 136 if (isset($_POST['seur_pickup_nonce_field']) && !wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['seur_pickup_nonce_field'])), 'seur_pickup_action')) {137 print 'Sorry, your nonce did not verify.';138 exit;139 }140 141 145 // Obtener los datos de las recogidas actuales 142 146 $date = gmdate( 'Y-m-d' );
Note: See TracChangeset
for help on using the changeset viewer.