Skip to content

Commit 8a90f73

Browse files
fix: remove WP_ENV check, use auth based on constants only
1 parent 9505d59 commit 8a90f73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/Blocks/SharedBlock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ private function get_rendered_block( int $site_id, int $post_id, string $block_i
292292
$request_args = [];
293293

294294
// Add authentication headers if in non-production environment and credentials are defined
295-
if ( defined( 'WP_ENV' ) && 'production' !== WP_ENV && defined( 'MULTISITE_BLOCKS_AUTH_USER' ) && defined( 'MULTISITE_BLOCKS_AUTH_PWD' ) && ! empty( MULTISITE_BLOCKS_AUTH_USER ) && ! empty( MULTISITE_BLOCKS_AUTH_PWD ) ) {
295+
if ( defined( 'MULTISITE_BLOCKS_AUTH_USER' ) && defined( 'MULTISITE_BLOCKS_AUTH_PWD' ) && ! empty( MULTISITE_BLOCKS_AUTH_USER ) && ! empty( MULTISITE_BLOCKS_AUTH_PWD ) ) {
296296
$request_args = [
297297
'headers' => [
298298
'Authorization' => 'Basic ' . base64_encode( MULTISITE_BLOCKS_AUTH_USER . ':' . MULTISITE_BLOCKS_AUTH_PWD ),

0 commit comments

Comments
 (0)