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

Commit

Permalink
Allow the trigger strings to occur anywhere in the URI
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Snook committed Jul 19, 2017
1 parent 50f98cc commit 5c0c597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hotfixes/wc-api-dev-jetpack-hotfixes.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function wc_api_dev_jetpack_sync_sender_should_load( $sender_should_load ) {
$trigger_strings = array( '/wp-json/wc/v', '/?rest_route=%2Fwc%2Fv' );

foreach( $trigger_strings as $trigger_string ) {
if ( $trigger_string === substr( $_SERVER[ 'REQUEST_URI' ], 0, strlen( $trigger_string ) ) ) {
if ( false !== strpos( $_SERVER[ 'REQUEST_URI' ], $trigger_string ) ) {
$sender_should_load = false;
break;
}
Expand Down

0 comments on commit 5c0c597

Please sign in to comment.