Hide widget if logged out on the account page. Closes #361.

This commit is contained in:
Mike Jolley 2011-12-15 01:26:15 +00:00
parent 7ce329b2fd
commit 1cc32d1740
1 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,9 @@ class WooCommerce_Widget_Login extends WP_Widget {
extract($args);
// Don't show if on the account page since that has a login
if (is_account_page() && !is_user_logged_in()) return;
$logged_out_title = (!empty($instance['logged_out_title'])) ? $instance['logged_out_title'] : __('Customer Login', 'woothemes');
$logged_in_title = (!empty($instance['logged_in_title'])) ? $instance['logged_in_title'] : __('Welcome %s', 'woothemes');