Jump to content


Photo
WooCommerce for PageLines

SSL Problem with WooCommerce checkout - non-secure items



Best Answer ellenmva , 13 June 2013 - 02:04 PM

I made a change in the WooCommerce for Pagelines plugin so go into Pagelines --> Store --> Plugins --> Your Plugins and update. If you don't see the update there, scroll to the bottom and click on Refresh Store.

 

Then either in your child theme or using the Pagelines Customize plugin put this code in the functions.php file.

 
add_filter( 'pless_vars', 'make_ssl_vars' );
add_action( 'pl_force_ssl', '__return_true' );
    
function make_ssl_vars( $vars ) {
    $vars['plSectionsRoot'] = str_replace( 'http://', 'https://', $vars['plSectionsRoot'] );
    $vars['plRoot'] = str_replace( 'http://', 'https://', $vars['plRoot'] );
    return $vars;
}

Then go to Pagelines --> Site Options and Save Options.

 

The pagelines-compiled-css file should now be https.

 

Ellen

Go to the full post


  • Please log in to reply
4 replies to this topic

#1 fd1139

fd1139

    Newbie

  • Members

  • 2 posts
  • Country: Country Flag

Posted 12 June 2013 - 07:27 PM

I released a new site using Pageworks and WooCommerce, including WC Pagelines.  WooCommerce is set to force and unforce SSL.  WooCommerce status page is attached that lists all version - all current at time of this post.

 

 

 

I searched this forum and others looking for a solution.  I tried, with no success, adding PHP filters to functions.php.  I also tried forcing SSL for the entire site, with no success.  

 

Message from Chrome Console:

[blocked] The page at [checkout page] ran insecure content from http://[domain]/wp-c...s-1_1370917795/.

 

How can I get SSL to work properly?  Any help is much appreciated.

 

Thank you.


  • hostmonkee2 likes this

#2 ellenmva

ellenmva

    Advocate

  • Members

  • 343 posts
  • LocationMassachusetts
  • Country: Country Flag

Posted 13 June 2013 - 02:04 PM   Best Answer

I made a change in the WooCommerce for Pagelines plugin so go into Pagelines --> Store --> Plugins --> Your Plugins and update. If you don't see the update there, scroll to the bottom and click on Refresh Store.

 

Then either in your child theme or using the Pagelines Customize plugin put this code in the functions.php file.

 
add_filter( 'pless_vars', 'make_ssl_vars' );
add_action( 'pl_force_ssl', '__return_true' );
    
function make_ssl_vars( $vars ) {
    $vars['plSectionsRoot'] = str_replace( 'http://', 'https://', $vars['plSectionsRoot'] );
    $vars['plRoot'] = str_replace( 'http://', 'https://', $vars['plRoot'] );
    return $vars;
}

Then go to Pagelines --> Site Options and Save Options.

 

The pagelines-compiled-css file should now be https.

 

Ellen



#3 fd1139

fd1139

    Newbie

  • Members

  • 2 posts
  • Country: Country Flag

Posted 14 June 2013 - 01:57 AM

Ellen,

 

Thank you very much for the quick reply and updated code.  Everything worked as you described.

 

BTW: A short time after you replied WooCommerce 2.0.11 was released.  I tested your update with both WC 2.0.10 and 2.0.11.  Everything worked with both WC releases.

 

I appreciate your help!!

 

FD



#4 ellenmva

ellenmva

    Advocate

  • Members

  • 343 posts
  • LocationMassachusetts
  • Country: Country Flag

Posted 14 June 2013 - 11:41 AM

Perfect! Glad everything is working. I'll be switching a client site over to Pagelines soon who uses WooCommerce that is using an SSL certificate too. Now I won't have to figure it out :)

 

Ellen


  • mikezielonka likes this

#5 JasonLA

JasonLA

    Advanced Member

  • Members

  • 96 posts
  • Country: Country Flag

Posted 21 August 2013 - 07:23 PM

@ellenmva I am still having an issue with this, even after adding your code to the cutsomize plugin. 

 

When I go to my pages like zox.la/my-account, it's still pulling css from http? http://zox.la/wp-con...s-1_1377103319/

 

Any ideas? 







Also tagged with one or more of these keywords: WooCommerce for PageLines