From ef89f820147939881ee9ba3d3e8476004f9f47c6 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 13 Jul 2015 10:59:34 +0100 Subject: [PATCH] wc_get_page_permalink should check page_id was found --- includes/wc-page-functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/wc-page-functions.php b/includes/wc-page-functions.php index 0d8faf651b9..6197eac8580 100644 --- a/includes/wc-page-functions.php +++ b/includes/wc-page-functions.php @@ -64,8 +64,8 @@ function wc_get_page_id( $page ) { * @return string */ function wc_get_page_permalink( $page ) { - $permalink = get_permalink( wc_get_page_id( $page ) ); - + $page_id = wc_get_page_id( $page ); + $permalink = $page_id ? get_permalink( $page_id ) : ''; return apply_filters( 'woocommerce_get_' . $page . '_page_permalink', $permalink ); }