Automattic\WooCommerce\Admin\API
Notes::get_requested_updates
Prepare an array with the requested updates.
Method of the class: Notes{}
No Hooks.
Returns
Array. A list of the requested updates values.
Usage
// protected - for code of main (parent) or child class $result = $this->get_requested_updates( $request );
- $request(WP_REST_Request) (required)
- Request object.
Notes::get_requested_updates() Notes::get requested updates code WC 10.5.0
protected function get_requested_updates( $request ) {
$requested_updates = array();
if ( ! is_null( $request->get_param( 'status' ) ) ) {
$requested_updates['status'] = $request->get_param( 'status' );
}
if ( ! is_null( $request->get_param( 'date_reminder' ) ) ) {
$requested_updates['date_reminder'] = $request->get_param( 'date_reminder' );
}
if ( ! is_null( $request->get_param( 'is_deleted' ) ) ) {
$requested_updates['is_deleted'] = $request->get_param( 'is_deleted' );
}
if ( ! is_null( $request->get_param( 'is_read' ) ) ) {
$requested_updates['is_read'] = $request->get_param( 'is_read' );
}
return $requested_updates;
}