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.
}
...
}
The following condition is incorrect: