WordPress.org

Ready to get started?Download WordPress

Forums

WP-Invoice - Web Invoice and Billing
[resolved] Archived invoices hidden (6 posts)

  1. Kenan
    Member
    Posted 1 year ago #

    Hi,
    I would like to still be able to see (View Online) archived invoices.
    How to change this?

    Thank you

    http://wordpress.org/extend/plugins/wp-invoice/

  2. Anton Korotkoff
    WP-Invoice Support
    Plugin Contributor

    Posted 1 year ago #

    Hello @Kenan,

    there is no such ability or setting in the plugin of current version.

  3. Kenan
    Member
    Posted 1 year ago #

    Thank you,

    You are correct, no option GUI, but my question was about editing plugin code...
    However, I found it in wp-invoice.php

    function viewable_types() {
          return array( 'paid', 'active', 'pending', 'refund', 'archived' );
        }

    In case someone need it...
    Thank you again.

  4. Anton Korotkoff
    WP-Invoice Support
    Plugin Contributor

    Posted 1 year ago #

    @Kenan,

    your code will probably work but it will be overwritten after plugin upgrade.

    You'd better use filter (put it maybe in your theme functions.php):

    add_filter('viewable_invoice_types', 'wpi_viewable_types', 11);
    
    function wpi_viewable_types( $types ) {
      $types[] = 'archived';
      return $types;
    }
  5. Kenan
    Member
    Posted 1 year ago #

    Perfect!
    Thank you

  6. Anton Korotkoff
    WP-Invoice Support
    Plugin Contributor

    Posted 1 year ago #

    You are welcome!
    Thank you for using our products.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.