Autoload Ocean Popup Login on WooCommerce Checkout Page

This is a Developer Level doc.

If you're unfamiliar with PHP and/or editing files, codes and templates, as well as with resolving possible conflict, please seek help from a professional. Under our Support Policy, we don't provide support for modifications and customization.

If you would like to enable auto load of Ocean Popup Login on the WooCommerce checkout page (for logged out users), use the following PHP/JS snippet:

* Autoload login popup on checkout page

function add_js_functions() {
if ( ! is_user_logged_in() && is_checkout() ) : ?>
(function($) {
$(document).ready(function() {
var loginForm = $( '#opl-login-form' );
// Show form
$('.opl-login-container .opl-login-content').css('opacity', '1');
<?php endif;

Code snippet provided by Roland Riddel.

All PHP snippets should be added via a child theme's functions.php file.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.