×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Peter Goudkamp
Added: Mar 3, 2015 9:31 PM
Views: 47
Tags: woocommerce
  1. $myaccount_page_id = get_option( 'woocommerce_myaccount_page_id' );
  2.  
  3. if ( $myaccount_page_id ) {
  4.  
  5.   $logout_url = wp_logout_url( get_permalink( $myaccount_page_id ) );
  6.  
  7.   if ( get_option( 'woocommerce_force_ssl_checkout' ) == 'yes' )
  8.     $logout_url = str_replace( 'http:', 'https:', $logout_url );
  9. }