Version 1.0.15 – wpinv_insert_invoice()

This topic contains 2 replies, has 3 voices, and was last updated by  picocodes 4 years, 8 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #4214

    Arshad Ali
    Full Member
    Post count: 27

    I just upgraded from Version 1.0.14 to 1.0.15 and found an issue with wpinv_insert_invoice().

    By default post type is being assigned as “wpi-invoice”

    if ( empty( $invoice_data[‘post_type’] ) ) {
    $invoice_data[‘post_type’] = ‘wpi-invoice’;
    }

    However, in setup_invoice function in class-wpinv-invoice.php (line 123), it is being checked against “wpi_invoice”. should be fixed.

    if( !(‘wpi_invoice’ == $invoice->post_type OR ‘wpi_quote’ == $invoice->post_type) ) {
    return false;
    }

    This is causing issue while creating invoice programmatically, when post type is not provided specifically.

    #4218

    Alex Rollin
    Moderator
    Post count: 27815

    Thanks for reporting, the developers will look into the issue and get back to you with an update here.

    #4244

    picocodes
    Moderator
    Post count: 141

    Hi, this was fixed and released in version 1.0.16. Thanks.

Viewing 3 posts - 1 through 3 (of 3 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket