PluginProbe
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder / 3.0.9
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder v3.0.9
3.1.4 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.0.7 3.0.5 3.0.4 3.0.3 3.0.2 trunk 1.5.0 1.5.1 1.5.2 1.6.1 1.6.2 1.6.3 1.6.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 All 93 releases
ultimate-store-kit / includes / builder / templates / woocommerce / login.php

login.php in Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder 3.0.9, at includes/builder/templates/woocommerce/login.php

64 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Login & Register page wrapper for the Ultimate Store Kit builder.
4 *
5 * Loaded by Builder_Integration::setFrontendTemplate() when a logged-out
6 * visitor lands on the My Account page and the site has an enabled
7 * `account|login` template. A single template handles both authentication
8 * flows because WooCommerce's own form-login.php renders the login and
9 * registration forms on the same URL — there is no separate /register/
10 * endpoint in WooCommerce.
11 *
12 * @package UltimateStoreKit
13 * @version 1.0.0
14 */
15
16 defined('ABSPATH') || exit;
17
18 use UltimateStoreKit\Builder\Builder_Integration;
19
20 get_header('shop');
21
22 /**
23 * Hook: woocommerce_before_main_content.
24 *
25 * Standard WC layout hook — themes rely on this to open their wrappers
26 * (woocommerce_output_content_wrapper). Keeping it lets the login page
27 * inherit the theme's account-area layout instead of escaping it.
28 */
29 do_action('woocommerce_before_main_content');
30
31 // Display WooCommerce notices (login errors, password-reset success, etc.).
32 if (function_exists('wc_print_notices')) {
33 wc_print_notices();
34 }
35
36 $usk_template_id = Builder_Integration::instance()->current_template_id;
37
38 $usk_has_content = false;
39 if ($usk_template_id && class_exists('Elementor\Plugin')) {
40 $usk_elementor_data = get_post_meta($usk_template_id, '_elementor_data', true);
41
42 if (is_string($usk_elementor_data)) {
43 $decoded = json_decode($usk_elementor_data, true);
44 $usk_has_content = is_array($decoded) && ! empty($decoded);
45 } elseif (is_array($usk_elementor_data)) {
46 $usk_has_content = ! empty($usk_elementor_data);
47 }
48 }
49
50 do_action('woocommerce_before_customer_login_form');
51
52 if ($usk_has_content) {
53 echo Elementor\Plugin::instance()->frontend->get_builder_content($usk_template_id, false);
54 } else {
55 // Fallback to WC's stock login/register form so the page is never empty.
56 wc_get_template('myaccount/form-login.php');
57 }
58
59 do_action('woocommerce_after_customer_login_form');
60
61 do_action('woocommerce_after_main_content');
62
63 get_footer('shop');
64