Changeset 3327409
- Timestamp:
- 07/14/2025 09:41:01 AM (9 months ago)
- Location:
- woo-cancel-abandoned-order/trunk
- Files:
-
- 6 edited
-
includes/class-cao.php (modified) (4 diffs)
-
includes/class-stripe.php (modified) (1 diff)
-
includes/class-wp.php (modified) (2 diffs)
-
languages/woo-cancel-abandoned-order.pot (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
-
woo-cancel-abandoned-order.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-cancel-abandoned-order/trunk/includes/class-cao.php
r2632529 r3327409 106 106 public function check_order() { 107 107 108 global $wpdb;109 110 108 if ( $this->gateways ) { 111 109 foreach ( $this->gateways as $gateway ) { … … 134 132 // Status to cancel 135 133 $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, 153 141 ) 154 142 ); 143 155 144 if ( $orders ) { 156 145 foreach ( $orders as $order ) { … … 227 216 */ 228 217 private function woocao_icon() { 229 return sprintf( '<span class="woocao-icon" title="%s"></span>', esc_html__( ' WooCommerceCancel 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' ) ); 230 219 } 231 220 … … 242 231 $new_fields = array( 243 232 'woocao' => array( 244 'title' => esc_html__( ' WooCommerceCancel Abandoned Order', 'woo-cancel-abandoned-order' ),233 'title' => esc_html__( 'Cancel Abandoned Order', 'woo-cancel-abandoned-order' ), 245 234 'type' => 'title', 246 235 'description' => '', -
woo-cancel-abandoned-order/trunk/includes/class-stripe.php
r2632529 r3327409 33 33 */ 34 34 public function messageNewStripe() { 35 printf( '<h2>%s</h2>', esc_html__( ' WooCommerceCancel Abandoned Order', 'woo-cancel-abandoned-order' ) );35 printf( '<h2>%s</h2>', esc_html__( 'Cancel Abandoned Order', 'woo-cancel-abandoned-order' ) ); 36 36 printf( 37 37 __( '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 33 33 $this->load_languages(); 34 34 add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 ); 35 36 add_action('before_woocommerce_init', array( $this, 'enable_woo_hpos' )); 35 37 36 38 $this->required(); … … 93 95 return $plugin_meta; 94 96 } 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 } 95 108 } -
woo-cancel-abandoned-order/trunk/languages/woo-cancel-abandoned-order.pot
r2632529 r3327409 2 2 msgid "" 3 3 msgstr "" 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" 6 9 "MIME-Version: 1.0\n" 7 10 "Content-Type: text/plain; charset=UTF-8\n" 8 11 "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" 11 14 "X-Poedit-KeywordsList: esc_html__\n" 12 "Plural-Forms: nplurals=2; plural=(n > 1);\n"13 15 "X-Poedit-SourceCharset: UTF-8\n" 14 16 "X-Poedit-Basepath: ..\n" 15 "PO-Revision-Date: \n"16 "Last-Translator: \n"17 17 "X-Poedit-SearchPath-0: .\n" 18 18 19 #: includes/class-cao.php:1 8119 #: includes/class-cao.php:170 20 20 msgid "Cancellation of the order because payment not received at time." 21 21 msgstr "" 22 22 23 #: includes/class-cao.php:2 29 includes/class-cao.php:24423 #: includes/class-cao.php:218 includes/class-cao.php:233 24 24 #: includes/class-stripe.php:35 25 msgid " WooCommerceCancel Abandoned Order"25 msgid "Cancel Abandoned Order" 26 26 msgstr "" 27 27 28 #: includes/class-cao.php:2 50includes/class-stripe.php:8928 #: includes/class-cao.php:239 includes/class-stripe.php:89 29 29 msgid "Enable/Disable" 30 30 msgstr "" 31 31 32 #: includes/class-cao.php:2 52 includes/class-cao.php:25932 #: includes/class-cao.php:241 includes/class-cao.php:248 33 33 msgid "Activation the automatic cancellation of orders." 34 34 msgstr "" 35 35 36 #: includes/class-cao.php:2 54includes/class-stripe.php:9136 #: includes/class-cao.php:243 includes/class-stripe.php:91 37 37 msgid "Enable this option to automatically cancel all \"on Hold\" orders that you have not received payment for." 38 38 msgstr "" 39 39 40 #: includes/class-cao.php:2 57includes/class-stripe.php:9640 #: includes/class-cao.php:246 includes/class-stripe.php:96 41 41 msgid "Mode" 42 42 msgstr "" 43 43 44 #: includes/class-cao.php:2 62includes/class-stripe.php:10044 #: includes/class-cao.php:251 includes/class-stripe.php:100 45 45 msgid "Hourly" 46 46 msgstr "" 47 47 48 #: includes/class-cao.php:2 63includes/class-stripe.php:10148 #: includes/class-cao.php:252 includes/class-stripe.php:101 49 49 msgid "Daily" 50 50 msgstr "" 51 51 52 #: includes/class-cao.php:2 68includes/class-stripe.php:10752 #: includes/class-cao.php:257 includes/class-stripe.php:107 53 53 msgid "Lifetime in hour" 54 54 msgstr "" 55 55 56 #: includes/class-cao.php:2 70includes/class-stripe.php:10956 #: includes/class-cao.php:259 includes/class-stripe.php:109 57 57 msgid "Enter the number of hours (whole number) during which the system must consider a \"pending\" command as canceled." 58 58 msgstr "" 59 59 60 #: includes/class-cao.php:2 72 includes/class-cao.php:28060 #: includes/class-cao.php:261 includes/class-cao.php:269 61 61 msgid "days" 62 62 msgstr "" 63 63 64 #: includes/class-cao.php:2 76includes/class-stripe.php:11564 #: includes/class-cao.php:265 includes/class-stripe.php:115 65 65 msgid "Lifetime in days" 66 66 msgstr "" 67 67 68 #: includes/class-cao.php:2 78includes/class-stripe.php:11768 #: includes/class-cao.php:267 includes/class-stripe.php:117 69 69 msgid "Enter the number of days that the system must consider a \"on Hold\" order as canceled." 70 70 msgstr "" 71 71 72 #: includes/class-wp.php: 8872 #: includes/class-wp.php:90 73 73 msgid "Donate" 74 74 msgstr "" -
woo-cancel-abandoned-order/trunk/readme.txt
r2889840 r3327409 1 === WooCommerceCancel Abandoned Order ===1 === Cancel Abandoned Order === 2 2 Contributors: rvola 3 3 Donate link: https://www.paypal.me/rvola 4 4 Tags: woocommerce, cancel, order, pending, on hold, gateway 5 5 Requires at least: 4.0 6 Tested up to: 6. 26 Tested up to: 6.8 7 7 Requires PHP: 7.0 8 Stable tag: 2. 0.08 Stable tag: 2.1.0 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 14 14 == Description == 15 15 16 ** WooCommerceCancel 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. 17 17 18 18 If 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. 19 19 20 WooCommerceCancel 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.20 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. 21 21 22 22 [**GitHub**](https://github.com/rvola/woo-cancel-abandoned-order) | [**Donate**](https://www.paypal.me/rvola) … … 81 81 82 82 = I want to make suggestions = 83 We’re glad you want to help us improve ** WooCommerceCancel Abandoned Order**!83 We’re glad you want to help us improve **Cancel Abandoned Order**! 84 84 The GIT repository is available here [https://github.com/rvola/woo-cancel-abandoned-order](https://github.com/rvola/woo-cancel-abandoned-order) 85 85 -
woo-cancel-abandoned-order/trunk/woo-cancel-abandoned-order.php
r2889840 r3327409 1 1 <?php 2 2 /* 3 Plugin Name: WooCommerceCancel Abandoned Order3 Plugin Name: Cancel Abandoned Order 4 4 Plugin URI: https://github.com/rvola/woo-cancel-abandoned-order 5 5 6 6 Description: Cancel "on hold" orders after a certain number of days or by hours 7 7 8 Version: 2. 0.09 Revision: 202 2-05-068 Version: 2.1.0 9 Revision: 2025-07-14 10 10 Creation: 2017-10-28 11 11 … … 17 17 18 18 Requires at least: 4.0 19 Tested up to: 6. 219 Tested up to: 6.8 20 20 Requires PHP: 7.0 21 21 22 22 WC requires at least: 2.2 23 WC tested up to: 7.023 WC tested up to: 9.9 24 24 25 25 License: GNU General Public License v3.0 … … 34 34 35 35 define( 'WOOCAO_FILE', __FILE__ ); 36 define( 'WOOCAO_VERSION', '2. 0.0' );36 define( 'WOOCAO_VERSION', '2.1.0' ); 37 37 38 38 include_once ABSPATH . 'wp-admin/includes/plugin.php';
Note: See TracChangeset
for help on using the changeset viewer.