public function date_filter_pre() { if (!($this->args['start_date'] || $this->args['end_date'])) { return; } $this->setup_dates($this->args['start_date'], $this->args['end_date']); add_filter('posts_where', array($this, 'payments_where')); }