wpinv_update_invoice()

Introduction | Parameters | Examples Introduction # Update an invoice. wpinv_update_invoice( array $invoice_data = array(), bool $wp_error = false ) This method allows you to add/remove items to an invoice, add/remove discount for invoice, update billing address, update payment details etc. To update an invoice the $invoice_data must have a parameter ‘ID’ with an invoice […]

wpinv_insert_invoice()

Introduction | Parameters | Examples Introduction # Create an invoice. wpinv_insert_invoice( array $invoice_data = array(), bool $wp_error = false ) Parameters # $invoice_data (array) (Required) An array of elements to insert an invoice. status(string) (Optional) The invoice status. Learn more about invoice statuses.Default: ‘wpi-pending’ user_id(int) (Optional) The invoice user id.Default: user ID of current logged […]

wpinv_update_item()

Introduction | Parameters | Examples Introduction # Update an item. wpinv_update_item( array $args = array(), bool $wp_error = false ) Item data will be updated for the value set in ‘ID’ parameter. It only updates data which are passed to $args array. Parameters # $args (array) (Required) An array of elements to update an item. […]

wpinv_create_item()

Introduction | Parameters | Examples Introduction # Create a new item. wpinv_create_item( array $args = array(), bool $wp_error = false, bool $force_update = false ) If the $args parameter has ‘custom_id’ set to a value and $force_update is true, then item will be updated for matching ‘item_id’ and ‘type’. Parameters # $args (array) (Required) An […]