Skip to content
This repository was archived by the owner on Oct 4, 2019. It is now read-only.

Commit 5c0c597

Browse files
author
Allen Snook
committed
Allow the trigger strings to occur anywhere in the URI
1 parent 50f98cc commit 5c0c597

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hotfixes/wc-api-dev-jetpack-hotfixes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function wc_api_dev_jetpack_sync_sender_should_load( $sender_should_load ) {
3030
$trigger_strings = array( '/wp-json/wc/v', '/?rest_route=%2Fwc%2Fv' );
3131

3232
foreach( $trigger_strings as $trigger_string ) {
33-
if ( $trigger_string === substr( $_SERVER[ 'REQUEST_URI' ], 0, strlen( $trigger_string ) ) ) {
33+
if ( false !== strpos( $_SERVER[ 'REQUEST_URI' ], $trigger_string ) ) {
3434
$sender_should_load = false;
3535
break;
3636
}

0 commit comments

Comments
 (0)