woocommerce_trash_order

woocommerce_trash_order

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

do_action('woocommerce_trash_order') is found 2 times:

  • /includes/data-stores/abstract-wc-order-data-store-cpt.php line 333
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
                 * @since 2.7.0
                 *
                 * @param int      $order_id ID of the order that has been trashed.
                 */
                do_action( 'woocommerce_trash_order', $id );
            }
        }
    }
     
    /*
    |--------------------------------------------------------------------------
  • /src/Internal/DataStores/Orders/OrdersTableDataStore.php line 2458
    2454
    2455
    2456
    2457
    2458
    2459
    2460
    2461
    2462
    2463
    2464
                 * @since 2.7.0
                 *
                 * @param int $order_id ID of the order that has been trashed.
                 */
                do_action( 'woocommerce_trash_order', $order_id ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
            }
        }
    }
     
    /**
     * Handles the deletion of an order from the orders table when sync is disabled:

See this hook used in plugins: