Plugin Directory

Changeset 3437092


Ignore:
Timestamp:
01/11/2026 03:12:32 PM (3 months ago)
Author:
shieldclimb
Message:

Updated plugin to version 1.0.3: Tested up to WordPress 6.9 and WooCommerce 10.4.3, Auto-complete now work more reliably with virtual & downloadable orders, Compatibility with ShopMagic and other email/automation plugins

Location:
shieldclimb-auto-complete-orders-for-woocommerce/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • shieldclimb-auto-complete-orders-for-woocommerce/trunk/readme.txt

    r3327656 r3437092  
    11=== ShieldClimb – Auto Complete Orders for WooCommerce ===
    22Contributors: shieldclimb
    3 Donate link: https://shieldclimb.com/
     3Donate link: https://shieldclimb.com/product/donate-now/
    44Tags: Order Completion, Digital Products, Payment Integration, Virtual Products, WooCommerce
    55Requires at least: 5.8
    6 Tested up to: 6.8
    7 Stable tag: 1.0.2
     6Tested up to: 6.9
     7Stable tag: 1.0.3
    88Requires PHP: 7.2
    99WC requires at least: 5.8
    10 WC tested up to: 9.9.5
     10WC tested up to: 10.4.3
    1111License: GPLv2 or later
    1212License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     
    6666== ChangeLog ==
    6767
     68= V1.0.3 =
     69
     70* **Updated**: Auto-complete now works more reliably with virtual & downloadable orders
     71* **Fixed**: Compatibility with ShopMagic and other email/automation plugins
     72* **Updated**: Tested up to WordPress 6.9 and WooCommerce 10.4.3
     73
    6874= V1.0.2 =
    6975
  • shieldclimb-auto-complete-orders-for-woocommerce/trunk/shieldclimb-auto-complete-orders.php

    r3327656 r3437092  
    55 * Plugin URI: https://shieldclimb.com/free-woocommerce-plugins/auto-complete-orders/
    66 * Description: Auto Complete Orders for WooCommerce after payment. Works with downloadable & virtual products. Fast, lightweight & compatible with gateways.
    7  * Version: 1.0.2
     7 * Version: 1.0.3
    88 * Requires Plugins: woocommerce
    99 * Requires at least: 5.8
    10  * Tested up to: 6.8
     10 * Tested up to: 6.9
    1111 * WC requires at least: 5.8
    12  * WC tested up to: 9.9.5
     12 * WC tested up to: 10.4.3
    1313 * Requires PHP: 7.2
    1414 * Author: shieldclimb.com
    15  * Author URI: https://shieldclimb.com/about-us/
     15 * Author URI: https://shieldclimb.com/
    1616 * License: GPLv2 or later
    1717 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     
    2222}
    2323
    24 add_action('woocommerce_thankyou', 'shieldclimb_auto_complete_virtual_or_downloadable_order');
     24add_action(
     25    'woocommerce_order_status_processing',
     26    'shieldclimb_auto_complete_virtual_or_downloadable_order'
     27);
    2528
    2629function shieldclimb_auto_complete_virtual_or_downloadable_order($order_id) {
    27     if (!$order_id) return;
     30    if (! $order_id) {
     31        return;
     32    }
    2833
    2934    $order = wc_get_order($order_id);
     35    if (! $order) {
     36        return;
     37    }
    3038
    31     // Check if the order contains only virtual or downloadable items
    32     $shieldclimb_virtual_or_downloadable = true;
     39    $only_virtual_or_downloadable = true;
    3340
    3441    foreach ($order->get_items() as $item) {
    3542        $product = $item->get_product();
    3643
    37         if (!$product || (! $product->is_virtual() && ! $product->is_downloadable())) {
    38             $shieldclimb_virtual_or_downloadable = false;
     44        if (
     45            ! $product ||
     46            (! $product->is_virtual() && ! $product->is_downloadable())
     47        ) {
     48            $only_virtual_or_downloadable = false;
    3949            break;
    4050        }
    4151    }
    4252
    43     // Auto-complete if all items are virtual or downloadable
    44     if ($shieldclimb_virtual_or_downloadable && $order->get_status() === 'processing') {
    45         $order->update_status('completed');
     53    if ($only_virtual_or_downloadable) {
     54        $order->update_status(
     55            'completed',
     56            'Auto-completed by ShieldClimb for virtual/downloadable products.'
     57        );
    4658    }
    4759}
Note: See TracChangeset for help on using the changeset viewer.