From 3d118b37b2cfc60dc883f545abb500fdfafe61f5 Mon Sep 17 00:00:00 2001 From: Todd Lahman Date: Sat, 18 May 2013 23:24:03 -0700 Subject: [PATCH] Check if variable isset to avoid undefined error --- woocommerce.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/woocommerce.php b/woocommerce.php index 9fdc8516369..f3a7c75b65a 100644 --- a/woocommerce.php +++ b/woocommerce.php @@ -1353,7 +1353,7 @@ class Woocommerce { * @return string */ public function plugin_url() { - if ( $this->plugin_url ) return $this->plugin_url; + if ( isset( $this->plugin_url ) ) return $this->plugin_url; return $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) ); } @@ -1365,7 +1365,7 @@ class Woocommerce { * @return string */ public function plugin_path() { - if ( $this->plugin_path ) return $this->plugin_path; + if ( isset( $this->plugin_path ) ) return $this->plugin_path; return $this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) ); }