WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Archived invoices hidden

[Resolved] Archived invoices hidden

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Anton Korotkoff
    WP-Invoice Support

    @anton-korotkoff

    Hello @kenan,

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

    Kenan
    Member

    @hodzickenan

    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.

    Plugin Contributor Anton Korotkoff
    WP-Invoice Support

    @anton-korotkoff

    @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;
    }
    Kenan
    Member

    @hodzickenan

    Perfect!
    Thank you

    Plugin Contributor Anton Korotkoff
    WP-Invoice Support

    @anton-korotkoff

    You are welcome!
    Thank you for using our products.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Archived invoices hidden’ is closed to new replies.