HEX
Server: LiteSpeed
System: Linux us-phx-web629.main-hosting.eu 5.14.0-503.23.2.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 12 05:52:18 EST 2025 x86_64
User: u756937133 (756937133)
PHP: 8.2.30
Disabled: passthru,chgrp
Upload Files
File: //opt/.wp-cli/packages/vendor/hostinger/hostinger-command/hostinger-command.php
<?php

use Hostinger\WPCLI\Woocommerce\GetOrdersCommand;
use Hostinger\WPCLI\Woocommerce\GetWooOrdersCommand;
use Hostinger\WPCLI\Woocommerce\GetOrdersUpdatedCommand;

if ( ! class_exists( 'WP_CLI' ) ) {
    return;
}

$wpcli_hostinger_autoloader = __DIR__ . '/vendor/autoload.php';

if ( file_exists( $wpcli_hostinger_autoloader ) ) {
    require_once $wpcli_hostinger_autoloader;
}


if ( class_exists( GetOrdersCommand::class ) ) {
    WP_CLI::add_command( 'hostinger woocommerce get-orders', GetOrdersCommand::class, [
        'shortdesc' => 'Retrieve WooCommerce orders based on date range.',
        'longdesc'  => "Fetch all WooCommerce orders either from a specific date or for a set number of days.\n\n"
                       . "## EXAMPLES\n\n"
                       . "  wp hostinger woocommerce get-orders --days=7\n"
                       . "  Retrieves orders from the past 7 days.\n\n"
                       . "  wp hostinger woocommerce get-orders --from-date=2025-01-01\n"
                       . "  Retrieves orders from 2025-01-01 until yesterday.\n\n"
                       . "  wp hostinger woocommerce get-orders --from-date=2025-01-01 --to-date=2025-01-31\n"
                       . "  Retrieves orders for the exact date range.",
        'when'      => 'after_wp_load',
    ] );
}

if ( class_exists( GetWooOrdersCommand::class ) ) {
    WP_CLI::add_command( 'hostinger woocommerce get-woo-orders', GetWooOrdersCommand::class, [
        'shortdesc' => 'Retrieve WooCommerce orders based on date range.',
        'longdesc'  => "Fetch all WooCommerce orders either from a specific date or for a set number of days.\n\n"
                       . "## EXAMPLES\n\n"
                       . "  wp hostinger woocommerce get-woo-orders --from-date=2025-01-01\n"
                       . "  Retrieves all orders from 2025-01-01 until now.\n\n"
                       . "  wp hostinger woocommerce get-woo-orders --days=7\n"
                       . "  Retrieves all orders from the past 7 days.",
        'when'      => 'after_wp_load',
    ] );
}

if ( class_exists( GetOrdersUpdatedCommand::class ) ) {
    WP_CLI::add_command( 'hostinger woocommerce get-woo-orders-latest', GetOrdersUpdatedCommand::class, [
        'shortdesc' => 'Retrieve WooCommerce orders based on date range.',
        'longdesc'  => "Fetch all WooCommerce orders either from a specific date or for a set number of days.\n\n"
                       . "## EXAMPLES\n\n"
                       . "  wp hostinger woocommerce get-woo-orders-latest --from-date=2025-01-01\n"
                       . "  Retrieves all orders from 2025-01-01 until now.\n\n"
                       . "  wp hostinger woocommerce get-woo-orders-latest --days=7\n"
                       . "  Retrieves all orders from the past 7 days.",
        'when'      => 'after_wp_load',
    ] );
}