diff --git a/src/wp-includes/rest-api/class-wp-rest-request.php b/src/wp-includes/rest-api/class-wp-rest-request.php
index 26c1c0fb45..a4fb9c72d2 100644
--- a/src/wp-includes/rest-api/class-wp-rest-request.php
+++ b/src/wp-includes/rest-api/class-wp-rest-request.php
@@ -380,9 +380,10 @@ class WP_REST_Request implements ArrayAccess {
 	 * @since 4.4.0
 	 *
 	 * @param string $key Parameter name.
+	 * @param mixed  $default Optional. Default value to return if the key does not exist.
 	 * @return mixed|null Value if set, null otherwise.
 	 */
-	public function get_param( $key ) {
+	public function get_param( $key, $default = null ) {
 		$order = $this->get_parameter_order();
 
 		foreach ( $order as $type ) {
@@ -392,7 +393,7 @@ class WP_REST_Request implements ArrayAccess {
 			}
 		}
 
-		return null;
+		return $default;
 	}
 
 	/**
