Merge pull request #13927 from woocommerce/fix/13921
Fallback to home URL if no shop page is set for system status security check.
This commit is contained in:
commit
6135aa8175
|
@ -844,8 +844,9 @@ class WC_REST_System_Status_Controller extends WC_REST_Controller {
|
|||
* @return array
|
||||
*/
|
||||
public function get_security_info() {
|
||||
$check_page = 0 < wc_get_page_id( 'shop' ) ? get_permalink( wc_get_page_id( 'shop' ) ) : get_home_url();
|
||||
return array(
|
||||
'secure_connection' => 'https' === substr( get_permalink( wc_get_page_id( 'shop' ) ), 0, 5 ),
|
||||
'secure_connection' => 'https' === substr( $check_page, 0, 5 ),
|
||||
'hide_errors' => ! ( defined( 'WP_DEBUG' ) && defined( 'WP_DEBUG_DISPLAY' ) && WP_DEBUG && WP_DEBUG_DISPLAY ) || 0 === intval( ini_get( 'display_errors' ) ),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue