Automattic\WooCommerce\Admin\API

Notes::get_requested_updates()protectedWC 1.0

Prepare an array with the the requested updates.

Method of the class: Notes{}

No Hooks.

Return

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() code WC 8.7.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;
}