| @@ -6,9 +6,8 @@ | ||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | namespace WCPOS\WooCommercePOS\API\V2; |
| 9 | 9 | |
| 10 | -use WCPOS\WooCommercePOS\API\V2\Proxy\Fast_Path_Behavior; | |
| 11 | 10 | use WCPOS\WooCommercePOS\API\V2\Proxy\Null_Proxy_Behavior; |
| 12 | 11 | use WCPOS\WooCommercePOS\API\V2\Proxy\Proxy_Behavior; |
| 13 | 12 | use WCPOS\WooCommercePOS\Sync\Api; |
| 14 | 13 | use WCPOS\WooCommercePOS\Sync\Collections; |
| @@ -73,14 +72,8 @@ | ||
| 73 | 72 | * client sees the same failure it would have seen hitting wc/v3 directly. |
| 74 | 73 | */ |
| 75 | 74 | public function proxy( WP_REST_Request $request, string $wc_route, string $resource, ?Proxy_Behavior $behavior = null ) { |
| 76 | 75 | $behavior = $behavior ?? self::behavior_for( $resource ); |
| 77 | - if ( $behavior instanceof Fast_Path_Behavior ) { | |
| 78 | - $fast = $behavior->fast_response( $request ); | |
| 79 | - if ( null !== $fast ) { | |
| 80 | - return $fast; | |
| 81 | - } | |
| 82 | - } | |
| 83 | 76 | $query_params = $behavior->forwarded_params( $request->get_query_params(), $request ); |
| 84 | 77 | $inner = new WP_REST_Request( WP_REST_Server::READABLE, $wc_route ); |
| 85 | 78 | unset( $query_params[ Store_Scope::PARAM ] ); |
| 86 | 79 | $inner->set_query_params( $query_params ); |