Error thrown

Call to undefined method WP::add_query_var()