Plugin Directory

Changeset 3438726


Ignore:
Timestamp:
01/13/2026 03:10:17 PM (2 months ago)
Author:
wpmethods
Message:

fixed order refund issues

Location:
order-list-table-elementor-widget
Files:
10 added
4 edited

Legend:

Unmodified
Added
Removed
  • order-list-table-elementor-widget/trunk/order-list-table-elementor-widget.php

    r3323793 r3438726  
    44 * Description: Order List Table use for to show Woocommerce recent order list on a table, just use this Elementor Widget/Addon.
    55 * Plugin URI:  https://wpmethods.com/order-list-table-elementor-widget
    6  * Version:     3.0.0
     6 * Version:     3.0.1
    77 * Author:      WP Methods
    88 * Author URI:  https://wpmethods.com/
  • order-list-table-elementor-widget/trunk/order-list-table-register.php

    r3323680 r3438726  
    466466                'default' => [
    467467                    'value' => 'fa fa-times',
     468                    'library' => 'solid',
     469                ],
     470            ]
     471        );
     472
     473
     474        //Status Refunded Icon
     475        $this->add_control(
     476            'set_status_refunded_icon',
     477            [
     478                'label' => esc_html__('Status Refunded Icon', 'order-list-table-elementor-widget'),
     479                'type' => \Elementor\Controls_Manager::ICONS,
     480                'default' => [
     481                    'value' => 'fa fa-undo',
    468482                    'library' => 'solid',
    469483                ],
     
    17121726        $set_status_onhold_icon = $settings['set_status_onhold_icon'];
    17131727        $set_status_faild_icon = $settings['set_status_faild_icon'];
     1728        $set_status_refunded_icon = $settings['set_status_refunded_icon'];
     1729
    17141730
    17151731       
     
    18711887                            <?php
    18721888                            $sl = 1;
     1889
    18731890                            foreach ($customer_orders as $customer_order) {
     1891
     1892                                // Get order object
    18741893                                $order = $is_hpos_enabled ? $customer_order : wc_get_order($customer_order->ID);
    1875                                 if (!$order) continue;
     1894                                if ( ! $order ) continue;
     1895
     1896                                // 🔥 IMPORTANT: Handle refunded orders
     1897                                if ( $order instanceof WC_Order_Refund ) {
     1898                                    $order = wc_get_order( $order->get_parent_id() );
     1899                                    if ( ! $order ) continue;
     1900                                }
     1901
    18761902                                $order_date = $order->get_date_created();
     1903
     1904                                // Customer name fallback
     1905                                $first_name = $order->get_billing_first_name();
     1906                                $last_name  = $order->get_billing_last_name();
     1907                                $customer_name_display = trim($first_name . ' ' . $last_name);
     1908                                if ( empty($customer_name_display) ) {
     1909                                    $customer_name_display = 'Guest';
     1910                                }
    18771911                            ?>
    1878                                 <tr style="text-align:<?php echo esc_html($oltew_table_td_alignment); ?>;">
    1879                                    
     1912                                <tr style="text-align:<?php echo esc_attr($oltew_table_td_alignment); ?>;">
     1913
    18801914                                    <!-- Serial Number -->
    18811915                                    <?php if ($hide_order_sl !== 'yes') { ?>
    1882                                         <td class="order_sl" data-column="SL"><?php echo esc_html($sl++); ?></td>
    1883                                     <?php }; ?>
    1884                                    
     1916                                        <td class="order_sl" data-column="SL">
     1917                                            <?php echo esc_html($sl++); ?>
     1918                                        </td>
     1919                                    <?php } ?>
     1920
    18851921                                    <!-- Customer Name -->
    18861922                                    <?php if ($hide_customer_title !== 'yes') { ?>
    1887                                         <td class="customer_name"  data-column="<?php echo esc_html($customer_name); ?>">
     1923                                        <td class="customer_name" data-column="<?php echo esc_attr($customer_name); ?>">
    18881924                                            <div class="body_content">
    1889                                                 <div class="order_list_icon"><?php \Elementor\Icons_Manager::render_icon($customer_list_icon, ['aria-hidden' => 'true']); ?></div>
    1890                                                 <?php echo esc_html($order->get_billing_first_name() . ' ' . $order->get_billing_last_name() ?: 'Guest'); ?>
     1925                                                <div class="order_list_icon">
     1926                                                    <?php \Elementor\Icons_Manager::render_icon(
     1927                                                        $customer_list_icon,
     1928                                                        ['aria-hidden' => 'true']
     1929                                                    ); ?>
     1930                                                </div>
     1931                                                <?php echo esc_html($customer_name_display); ?>
    18911932                                            </div>
    18921933                                        </td>
    1893                                     <?php }; ?>
     1934                                    <?php } ?>
    18941935
    18951936                                    <!-- Sell Time -->
     
    19401981                                                <span class="st_cancelled status_odd"><span class="status_icon"><?php \Elementor\Icons_Manager::render_icon($set_status_faild_icon, ['aria-hidden' => 'true'])?></span> Failed</span>
    19411982                                            <?php }
     1983
     1984                                            //Refunded Status
     1985                                            if ( $order->get_total_refunded() > 0 && $order_status !== 'refunded' ) { ?>
     1986                                                <span class="st_cancelled status_odd"><span class="status_icon"><?php \Elementor\Icons_Manager::render_icon($set_status_refunded_icon, ['aria-hidden' => 'true'])?></span> Refunded</span>
     1987                                            <?php }
     1988
     1989
    19421990                                        ?>
    19431991                                    </td>
  • order-list-table-elementor-widget/trunk/readme.txt

    r3323793 r3438726  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 3.0.0
     7Stable tag: 3.0.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7070
    7171== Changelog ==
     72= 2.0.0 (2026-01-13) =
     73- Fixed Order Status Refunded Issue
     74- Fixed some minor issues
     75
    7276= 2.0.0 (2025-01-02) =
    7377- Fixed not showing order list some website.
  • order-list-table-elementor-widget/trunk/widgets-loader.php

    r3323793 r3438726  
    88final class Plugin {
    99
    10     const VERSION = '3.0.0';
     10    const VERSION = '3.0.1';
    1111    const MINIMUM_ELEMENTOR_VERSION = '3.7.0';
    1212    const MINIMUM_PHP_VERSION = '7.4';
Note: See TracChangeset for help on using the changeset viewer.