Plugin Directory

Changeset 3284727


Ignore:
Timestamp:
04/30/2025 08:41:33 AM (11 months ago)
Author:
seuroficial
Message:

2.2.24.1

Location:
seur/trunk/core/pages
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • seur/trunk/core/pages/rates/custom-name-rates.php

    r3283287 r3284727  
    11<?php
    22if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    3 ?>
    4 <div class="container">
    5     <br>
    63
    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' ) )
     4if ($_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')
    157    ) {
    168        print 'Sorry, your nonce did not verify.';
    179        exit;
    1810    }
     11}
    1912
    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();
     14if (  isset( $_POST['seur_custom_name_rates_post'] ) ) {
     15    foreach ($products as $custom_name => $product) {
     16        $rate_name_value = '';
    2417
    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 ] ) );
    3021        }
     22        update_option($product['field'] . '_custom_name_field', $rate_name_value);
    3123    }
    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>
    3430    <div class="content-loader">
    3531        <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  
    1010}
    1111
     12if ($_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}
    1220?>
    1321<div class="container">
     
    1523    <p><?php esc_html_e( 'Max package price for apply rate price based on weight', 'seur' ); ?></p>
    1624    <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">
    2426        <form method="post" action="admin.php?page=seur_rates_prices&tab=limit_price_weight_rates">
    2527            <table class="form-table">
     
    4446                    ?>
    4547                    <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' ); ?>
    4749                </tbody>
    4850            </table>
  • seur/trunk/core/pages/seur-pickup.php

    r3176965 r3284727  
    1818{
    1919    $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    }
    2029
    2130    // Procesar solicitudes de recogida o cancelación
     
    134143            wp_nonce_field('seur_pickup_action', 'seur_pickup_nonce_field');
    135144
    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 
    141145            // Obtener los datos de las recogidas actuales
    142146            $date = gmdate( 'Y-m-d' );
Note: See TracChangeset for help on using the changeset viewer.