diff --git a/includes/rest-api/wpem-rest-events-controller.php b/includes/rest-api/wpem-rest-events-controller.php index e665239..231e2d8 100644 --- a/includes/rest-api/wpem-rest-events-controller.php +++ b/includes/rest-api/wpem-rest-events-controller.php @@ -213,7 +213,13 @@ protected function prepare_objects_query( $request ) $args = parent::prepare_objects_query($request); // Set post_status. - $args['post_status'] = $request['status']; + + if (isset($request['status']) && $request['status'] !== 'any') { + $args['post_status'] = $request['status']; + } else { + unset($args['post_status']); + } + // Taxonomy query to filter events by type, category, // tag diff --git a/readme.txt b/readme.txt index cf71039..3b2d7ed 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Contributors: wpeventmanager,ashokdudhat,hiteshmakvana Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=55FRYATTFLA5N Tags: event manager, Event, events, event manager api , listings Requires at least: 4.1 -Tested up to: 5.8 +Tested up to: 5.9 Stable tag: 1.0.0 Requires PHP: 5.6 License: GPLv3 @@ -12,8 +12,16 @@ License URI: https://www.gnu.org/licenses/gpl-3.0.html WP Event Manager Rest API -== Description == +== Changelog == + += 1.0.1 [ May 17th, 2022 ] = +Fixed - Past events search. +Fixed - Message and status code improvements. +Fixed - Data improvements. + + +== Description == WP Event Manager Rest API diff --git a/wpem-rest-api.php b/wpem-rest-api.php index 49ddedd..a4a8702 100644 --- a/wpem-rest-api.php +++ b/wpem-rest-api.php @@ -45,7 +45,7 @@ public function __construct() } // Define constants - define('WPEM_REST_API_VERSION', '1.0.0'); + define('WPEM_REST_API_VERSION', '1.0.1'); define('WPEM_REST_API_FILE', __FILE__); define('WPEM_REST_API_PLUGIN_DIR', untrailingslashit(plugin_dir_path(__FILE__))); define('WPEM_REST_API_PLUGIN_URL', untrailingslashit(plugins_url(basename(plugin_dir_path(__FILE__)), basename(__FILE__))));