diff --git a/.changeset/handle-generate-home-url.md b/.changeset/handle-generate-home-url.md new file mode 100644 index 000000000..c53e9b08e --- /dev/null +++ b/.changeset/handle-generate-home-url.md @@ -0,0 +1,5 @@ +--- +"@faustwp/wordpress-plugin": patch +--- + +fix[faustwp]: use home_url() in handle_generate_endpoint so Bedrock-style installs (where WordPress core lives under /wp/) match against the public REQUEST_URI diff --git a/plugins/faustwp/includes/auth/callbacks.php b/plugins/faustwp/includes/auth/callbacks.php index da82180d0..5d33f7867 100644 --- a/plugins/faustwp/includes/auth/callbacks.php +++ b/plugins/faustwp/includes/auth/callbacks.php @@ -22,7 +22,7 @@ * @return void */ function handle_generate_endpoint() { - $search_pattern = ':^' . site_url( '/generate', 'relative' ) . ':'; + $search_pattern = ':^' . home_url( '/generate', 'relative' ) . ':'; if ( ! preg_match( $search_pattern, $_SERVER['REQUEST_URI'] ) ) { // phpcs:ignore WordPress.Security return;