Skip to content

Commit

Permalink
Check if variable isset to avoid undefined error
Browse files Browse the repository at this point in the history
  • Loading branch information
toddlahman committed May 19, 2013
1 parent aaa6a6a commit 3d118b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions woocommerce.php
Expand Up @@ -1353,7 +1353,7 @@ public function mailer() {
* @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__ ) );
}

Expand All @@ -1365,7 +1365,7 @@ public function plugin_url() {
* @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__ ) );
}
Expand Down

0 comments on commit 3d118b3

Please sign in to comment.