baselbers / woocommerce-pdf-invoices

Automatically generate and attach customizable PDF Invoices to WooCommerce emails and connect with Dropbox, Google Drive, OneDrive or Egnyte.
http://wcpdfinvoices.com
GNU General Public License v3.0
74 stars 41 forks source link

Reset yearly doesnt work #282

Open headerlocation opened 3 years ago

headerlocation commented 3 years ago

The following condition is incorrect:

if ( false === (bool) WPI()->get_option( 'reset_counter_yearly' ) ) {
public static function get_max_invoice_number( $year ) {
        global $wpdb;

        if ( false === (bool) WPI()->get_option( 'reset_counter_yearly' ) ) {
            // get by year.

        } else {
            // get all.

        }
...
}