Plugin Directory

Changeset 3327409


Ignore:
Timestamp:
07/14/2025 09:41:01 AM (9 months ago)
Author:
rvola
Message:

2.1.0

Location:
woo-cancel-abandoned-order/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • woo-cancel-abandoned-order/trunk/includes/class-cao.php

    r2632529 r3327409  
    106106    public function check_order() {
    107107
    108         global $wpdb;
    109 
    110108        if ( $this->gateways ) {
    111109            foreach ( $this->gateways as $gateway ) {
     
    134132                    // Status to cancel
    135133                    $woo_status = $this->woo_status();
    136                     $woo_status = implode( "','", $woo_status );
    137 
    138                     $orders = $wpdb->get_results(
    139                         $wpdb->prepare(
    140                             "
    141                             SELECT posts.ID
    142                             FROM $wpdb->posts as posts
    143                             INNER JOIN $wpdb->postmeta as meta
    144                             ON posts.ID = meta.post_id
    145                             WHERE posts.post_type = 'shop_order'
    146                             AND posts.post_status IN ('$woo_status')
    147                             AND posts.post_date < %s
    148                             AND meta.meta_key = '_payment_method'
    149                             AND meta.meta_value = %s
    150                         ",
    151                             $old_date_format,
    152                             $gateway
     134
     135                    $orders = wc_get_orders(
     136                        array(
     137                                'limit'        => -1,
     138                                'status'       => $woo_status,
     139                                'date_created' => '<' . $old_date_format,
     140                                'payment_method' => $gateway,
    153141                        )
    154142                    );
     143
    155144                    if ( $orders ) {
    156145                        foreach ( $orders as $order ) {
     
    227216     */
    228217    private function woocao_icon() {
    229         return sprintf( '<span class="woocao-icon" title="%s"></span>', esc_html__( 'WooCommerce Cancel Abandoned Order', 'woo-cancel-abandoned-order' ) );
     218        return sprintf( '<span class="woocao-icon" title="%s"></span>', esc_html__( 'Cancel Abandoned Order', 'woo-cancel-abandoned-order' ) );
    230219    }
    231220
     
    242231        $new_fields = array(
    243232            'woocao'         => array(
    244                 'title'       => esc_html__( 'WooCommerce Cancel Abandoned Order', 'woo-cancel-abandoned-order' ),
     233                'title'       => esc_html__( 'Cancel Abandoned Order', 'woo-cancel-abandoned-order' ),
    245234                'type'        => 'title',
    246235                'description' => '',
  • woo-cancel-abandoned-order/trunk/includes/class-stripe.php

    r2632529 r3327409  
    3333     */
    3434    public function messageNewStripe() {
    35         printf( '<h2>%s</h2>', esc_html__( 'WooCommerce Cancel Abandoned Order', 'woo-cancel-abandoned-order' ) );
     35        printf( '<h2>%s</h2>', esc_html__( 'Cancel Abandoned Order', 'woo-cancel-abandoned-order' ) );
    3636        printf(
    3737            __( 'We have moved the settings from WOOCAO to Stripe %s', 'woo-cancel-abandoned-order' ),
  • woo-cancel-abandoned-order/trunk/includes/class-wp.php

    r2632529 r3327409  
    3333        $this->load_languages();
    3434        add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
     35
     36        add_action('before_woocommerce_init', array( $this, 'enable_woo_hpos' ));
    3537
    3638        $this->required();
     
    9395        return $plugin_meta;
    9496    }
     97
     98    /**
     99     * Enable Woo HPOS ( High-performance order storage )
     100     *
     101     * @return void
     102     */
     103    public function enable_woo_hpos() {
     104        if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     105            \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     106        }
     107    }
    95108}
  • woo-cancel-abandoned-order/trunk/languages/woo-cancel-abandoned-order.pot

    r2632529 r3327409  
    22msgid ""
    33msgstr ""
    4 "Project-Id-Version: WooCommerce Cancel Abandoned Order - 2.0.X\n"
    5 "POT-Creation-Date: 2021-11-19 10:58+0100\n"
     4"Project-Id-Version: Cancel Abandoned Order - 2.1.X\n"
     5"POT-Creation-Date: 2025-07-14 11:34+0200\n"
     6"PO-Revision-Date: \n"
     7"Last-Translator: \n"
     8"Language-Team: \n"
    69"MIME-Version: 1.0\n"
    710"Content-Type: text/plain; charset=UTF-8\n"
    811"Content-Transfer-Encoding: 8bit\n"
    9 "Language-Team: \n"
    10 "X-Generator: Poedit 2.4.2\n"
     12"Plural-Forms: nplurals=2; plural=(n > 1);\n"
     13"X-Generator: Poedit 3.6\n"
    1114"X-Poedit-KeywordsList: esc_html__\n"
    12 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
    1315"X-Poedit-SourceCharset: UTF-8\n"
    1416"X-Poedit-Basepath: ..\n"
    15 "PO-Revision-Date: \n"
    16 "Last-Translator: \n"
    1717"X-Poedit-SearchPath-0: .\n"
    1818
    19 #: includes/class-cao.php:181
     19#: includes/class-cao.php:170
    2020msgid "Cancellation of the order because payment not received at time."
    2121msgstr ""
    2222
    23 #: includes/class-cao.php:229 includes/class-cao.php:244
     23#: includes/class-cao.php:218 includes/class-cao.php:233
    2424#: includes/class-stripe.php:35
    25 msgid "WooCommerce Cancel Abandoned Order"
     25msgid "Cancel Abandoned Order"
    2626msgstr ""
    2727
    28 #: includes/class-cao.php:250 includes/class-stripe.php:89
     28#: includes/class-cao.php:239 includes/class-stripe.php:89
    2929msgid "Enable/Disable"
    3030msgstr ""
    3131
    32 #: includes/class-cao.php:252 includes/class-cao.php:259
     32#: includes/class-cao.php:241 includes/class-cao.php:248
    3333msgid "Activation the automatic cancellation of orders."
    3434msgstr ""
    3535
    36 #: includes/class-cao.php:254 includes/class-stripe.php:91
     36#: includes/class-cao.php:243 includes/class-stripe.php:91
    3737msgid "Enable this option to automatically cancel all \"on Hold\" orders that you have not received payment for."
    3838msgstr ""
    3939
    40 #: includes/class-cao.php:257 includes/class-stripe.php:96
     40#: includes/class-cao.php:246 includes/class-stripe.php:96
    4141msgid "Mode"
    4242msgstr ""
    4343
    44 #: includes/class-cao.php:262 includes/class-stripe.php:100
     44#: includes/class-cao.php:251 includes/class-stripe.php:100
    4545msgid "Hourly"
    4646msgstr ""
    4747
    48 #: includes/class-cao.php:263 includes/class-stripe.php:101
     48#: includes/class-cao.php:252 includes/class-stripe.php:101
    4949msgid "Daily"
    5050msgstr ""
    5151
    52 #: includes/class-cao.php:268 includes/class-stripe.php:107
     52#: includes/class-cao.php:257 includes/class-stripe.php:107
    5353msgid "Lifetime in hour"
    5454msgstr ""
    5555
    56 #: includes/class-cao.php:270 includes/class-stripe.php:109
     56#: includes/class-cao.php:259 includes/class-stripe.php:109
    5757msgid "Enter the number of hours (whole number) during which the system must consider a \"pending\" command as canceled."
    5858msgstr ""
    5959
    60 #: includes/class-cao.php:272 includes/class-cao.php:280
     60#: includes/class-cao.php:261 includes/class-cao.php:269
    6161msgid "days"
    6262msgstr ""
    6363
    64 #: includes/class-cao.php:276 includes/class-stripe.php:115
     64#: includes/class-cao.php:265 includes/class-stripe.php:115
    6565msgid "Lifetime in days"
    6666msgstr ""
    6767
    68 #: includes/class-cao.php:278 includes/class-stripe.php:117
     68#: includes/class-cao.php:267 includes/class-stripe.php:117
    6969msgid "Enter the number of days that the system must consider a \"on Hold\" order as canceled."
    7070msgstr ""
    7171
    72 #: includes/class-wp.php:88
     72#: includes/class-wp.php:90
    7373msgid "Donate"
    7474msgstr ""
  • woo-cancel-abandoned-order/trunk/readme.txt

    r2889840 r3327409  
    1 === WooCommerce Cancel Abandoned Order ===
     1=== Cancel Abandoned Order ===
    22Contributors: rvola
    33Donate link: https://www.paypal.me/rvola
    44Tags: woocommerce, cancel, order, pending, on hold, gateway
    55Requires at least: 4.0
    6 Tested up to: 6.2
     6Tested up to: 6.8
    77Requires PHP: 7.0
    8 Stable tag: 2.0.0
     8Stable tag: 2.1.0
    99License: GPLv3
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    1414== Description ==
    1515
    16 **WooCommerce Cancel Abandoned Order** allows you to add a small option that will take care of dealing with "abandoned" commands.
     16** Cancel Abandoned Order** allows you to add a small option that will take care of dealing with "abandoned" commands.
    1717
    1818If you have check or transfer type orders for example, you will be able to set a maximum number of days or by hours to receive the payment.
    1919
    20 WooCommerce Cancel Abandoned Order, will take care of checking this and change the status of the order to "Cancel" if you have not received payment on time.
     20Cancel Abandoned Order, will take care of checking this and change the status of the order to "Cancel" if you have not received payment on time.
    2121
    2222[**GitHub**](https://github.com/rvola/woo-cancel-abandoned-order) | [**Donate**](https://www.paypal.me/rvola)
     
    8181
    8282= I want to make suggestions =
    83 We’re glad you want to help us improve **WooCommerce Cancel Abandoned Order**!
     83We’re glad you want to help us improve **Cancel Abandoned Order**!
    8484The GIT repository is available here [https://github.com/rvola/woo-cancel-abandoned-order](https://github.com/rvola/woo-cancel-abandoned-order)
    8585
  • woo-cancel-abandoned-order/trunk/woo-cancel-abandoned-order.php

    r2889840 r3327409  
    11<?php
    22/*
    3 Plugin Name:            WooCommerce Cancel Abandoned Order
     3Plugin Name:            Cancel Abandoned Order
    44Plugin URI:             https://github.com/rvola/woo-cancel-abandoned-order
    55
    66Description:            Cancel "on hold" orders after a certain number of days or by hours
    77
    8 Version:                2.0.0
    9 Revision:               2022-05-06
     8Version:                2.1.0
     9Revision:               2025-07-14
    1010Creation:               2017-10-28
    1111
     
    1717
    1818Requires at least:      4.0
    19 Tested up to:           6.2
     19Tested up to:           6.8
    2020Requires PHP:           7.0
    2121
    2222WC requires at least:   2.2
    23 WC tested up to:        7.0
     23WC tested up to:        9.9
    2424
    2525License:                GNU General Public License v3.0
     
    3434
    3535define( 'WOOCAO_FILE', __FILE__ );
    36 define( 'WOOCAO_VERSION', '2.0.0' );
     36define( 'WOOCAO_VERSION', '2.1.0' );
    3737
    3838include_once ABSPATH . 'wp-admin/includes/plugin.php';
Note: See TracChangeset for help on using the changeset viewer.