Testing out a better logout link for the WooCommerce top bar
authorLaury GvR <laury@gaslightmedia.com>
Tue, 1 Nov 2016 17:25:13 +0000 (13:25 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 1 Nov 2016 17:25:13 +0000 (13:25 -0400)
woocommerce.php

index 0f7d2bf..d1c001f 100644 (file)
@@ -31,7 +31,7 @@
                                         <a href="<?php echo $woocommerce->cart->get_cart_url();?>">
                                             <img src="<?php echo get_template_directory_uri(); ?>/assets/shopping-cart.png">
                                         </a>
-                                        <a href="<?php echo $woocommerce->cart->get_cart_url();?>">
+                                        <a href="<?php echo $woocommerce->cart->get_cart_url();?>"><h3>view cart</h3></a>
                                     </div>
 
                                 </div>
                                 </div>
                                 <div id="woo-quick-checkout" class="small-4 columns right">
                                     <?php
+                                     $logout_url = wp_logout_url( get_permalink( $myaccount_page_id ) );
+                                        if ( get_option( 'woocommerce_force_ssl_checkout' ) == 'yes' ) {
+                                            $logout_url = str_replace( 'http:', 'https:', $logout_url );
+                                        }
                                         if (is_user_logged_in()) { 
-                                            echo '<a href="'. get_permalink( $myaccount_page_id ) . '?customer-logout=true" class="button login_toggle">log out</a>';
+                                            echo '<a href="'. $logout_url . '" class="button login_toggle">log out</a>';
                                         }
                                         elseif (!is_user_logged_in()) {
                                             echo '<a href="'. get_permalink( $myaccount_page_id ) . '" class="button login_toggle">log in</a>';