Plugin Directory

Changeset 3301927


Ignore:
Timestamp:
05/28/2025 04:49:14 AM (7 months ago)
Author:
payuplugin
Message:

remove undefined and warnings

Location:
payu-india
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • payu-india/tags/3.8.5/includes/class-wc-gateway-payu.php

    r3278789 r3301927  
    359359        $phone = substr($phone, -10);   
    360360        }
     361        // $get_state_list = get_state_list();
     362        // $state = $get_state_list[sanitize_text_field($order->billing_state)];
    361363        $get_state_list = get_state_list();
    362         $state = $get_state_list[sanitize_text_field($order->billing_state)];
     364        $billing_state_key = sanitize_text_field($order->billing_state);
     365        $state = isset($get_state_list[$billing_state_key]) ? $get_state_list[$billing_state_key] : '';
    363366        $city = $order->billing_city ? sanitize_email($order->billing_city) : '';
    364367        // $city = sanitize_text_field($order->billing_city);
  • payu-india/tags/3.8.5/includes/payu-cart-express-checkout.php

    r3278789 r3301927  
    307307    public function add_custom_order_total_row($total_rows, $order)
    308308    {
    309         if ($total_rows['payment_method']['value'] == 'PayUBiz') {
     309        // if ($total_rows['payment_method']['value'] == 'PayUBiz') {
     310        if (isset($total_rows['payment_method']['value']) && $total_rows['payment_method']['value'] === 'PayUBiz') {
    310311            $payment_mode['payment_mode'] = array(
    311312                'label' => __('Payment Mode', 'your-text-domain'),
  • payu-india/tags/3.8.5/includes/payu-payment-gateway-api.php

    r3278789 r3301927  
    296296                );
    297297
     298                // $get_state_list = get_state_list();
     299                // $state = $get_state_list[$address[$address_type . '_state']];
    298300                $get_state_list = get_state_list();
    299                 $state = $get_state_list[$address[$address_type . '_state']];
     301                $state_key = $address[$address_type . '_state'] ?? null;
     302                $state = $state_key && isset($get_state_list[$state_key]) ? $get_state_list[$state_key] : '';
    300303
    301304                // Request body
  • payu-india/trunk/includes/class-wc-gateway-payu.php

    r3278794 r3301927  
    359359        $phone = substr($phone, -10);   
    360360        }
     361        // $get_state_list = get_state_list();
     362        // $state = $get_state_list[sanitize_text_field($order->billing_state)];
    361363        $get_state_list = get_state_list();
    362         $state = $get_state_list[sanitize_text_field($order->billing_state)];
     364        $billing_state_key = sanitize_text_field($order->billing_state);
     365        $state = isset($get_state_list[$billing_state_key]) ? $get_state_list[$billing_state_key] : '';
    363366        $city = $order->billing_city ? sanitize_email($order->billing_city) : '';
    364367        // $city = sanitize_text_field($order->billing_city);
  • payu-india/trunk/includes/payu-cart-express-checkout.php

    r3278794 r3301927  
    307307    public function add_custom_order_total_row($total_rows, $order)
    308308    {
    309         if ($total_rows['payment_method']['value'] == 'PayUBiz') {
     309        // if ($total_rows['payment_method']['value'] == 'PayUBiz') {
     310        if (isset($total_rows['payment_method']['value']) && $total_rows['payment_method']['value'] === 'PayUBiz') {
    310311            $payment_mode['payment_mode'] = array(
    311312                'label' => __('Payment Mode', 'your-text-domain'),
  • payu-india/trunk/includes/payu-payment-gateway-api.php

    r3278794 r3301927  
    296296                );
    297297
     298                // $get_state_list = get_state_list();
     299                // $state = $get_state_list[$address[$address_type . '_state']];
    298300                $get_state_list = get_state_list();
    299                 $state = $get_state_list[$address[$address_type . '_state']];
     301                $state_key = $address[$address_type . '_state'] ?? null;
     302                $state = $state_key && isset($get_state_list[$state_key]) ? $get_state_list[$state_key] : '';
    300303
    301304                // Request body
Note: See TracChangeset for help on using the changeset viewer.