/** * wcj_shortcode. * * @version 2.5.7 */ function wcj_shortcode($atts, $content, $shortcode) { // Init if (empty($atts)) { $atts = array(); } // Add child class specific atts $atts = $this->add_extra_atts($atts); // Merge atts with global defaults $global_defaults = array('before' => '', 'after' => '', 'visibility' => '', 'site_visibility' => '', 'location' => '', 'not_location' => '', 'wpml_language' => '', 'wpml_not_language' => '', 'billing_country' => '', 'not_billing_country' => '', 'module' => '', 'find' => '', 'replace' => ''); $atts = array_merge($global_defaults, $atts); // Check for required atts if (false === ($atts = $this->init_atts($atts))) { return ''; } // Check for module enabled if ('' != $atts['module'] && !wcj_is_module_enabled($atts['module'])) { return '<p>' . sprintf(__('%s module not enabled!', 'woocommerce-jetpack'), $atts['module_name']) . '</p>'; } // Check if privileges are ok if ('' != $atts['visibility']) { $visibilities = str_replace(' ', '', $atts['visibility']); $visibilities = explode(',', $visibilities); $is_iser_visibility_ok = false; foreach ($visibilities as $visibility) { if ('admin' === $visibility) { $visibility = 'administrator'; } if (wcj_is_user_role($visibility)) { $is_iser_visibility_ok = true; break; } } if (!$is_iser_visibility_ok) { // return '<p><a href="' . wp_login_url( get_permalink() ) . '" title="' . $atts['login_text'] . '">' . $atts['login_text'] . '</a></p>'; if (!is_user_logged_in()) { ob_start(); woocommerce_login_form(); return ob_get_clean(); } else { return '<p>' . __('Wrong user role!', 'woocommerce-jetpack') . '</p>'; } } } // Check if site visibility is ok if ('' != $atts['site_visibility']) { if ('single' === $atts['site_visibility'] && !is_single() || 'page' === $atts['site_visibility'] && !is_page() || 'archive' === $atts['site_visibility'] && !is_archive()) { return ''; } } // Check if location is ok if ('' != $atts['location'] && 'all' != $atts['location'] && $atts['location'] != $this->wcj_get_user_location()) { return ''; } if ('' != $atts['not_location'] && $atts['not_location'] === $this->wcj_get_user_location()) { return ''; } // Check if language is ok if ('wcj_wpml' === $shortcode || 'wcj_wpml_translate' === $shortcode) { $atts['wpml_language'] = isset($atts['lang']) ? $atts['lang'] : ''; } if ('wcj_wpml' === $shortcode || 'wcj_wpml_translate' === $shortcode) { $atts['wpml_not_language'] = isset($atts['not_lang']) ? $atts['not_lang'] : ''; } if ('' != $atts['wpml_language']) { if (!defined('ICL_LANGUAGE_CODE')) { return ''; } if (!in_array(ICL_LANGUAGE_CODE, $this->custom_explode($atts['wpml_language']))) { return ''; } } // Check if language is ok (not in...) if ('' != $atts['wpml_not_language']) { if (defined('ICL_LANGUAGE_CODE')) { if (in_array(ICL_LANGUAGE_CODE, $this->custom_explode($atts['wpml_not_language']))) { return ''; } } } // Check if billing country by arg is ok if ('' != $atts['billing_country']) { if (!isset($_GET['billing_country'])) { return ''; } if (!in_array($_GET['billing_country'], $this->custom_explode($atts['billing_country']))) { return ''; } } // Check if billing country by arg is ok (not in...) if ('' != $atts['not_billing_country']) { if (isset($_GET['billing_country'])) { if (in_array($_GET['billing_country'], $this->custom_explode($atts['not_billing_country']))) { return ''; } } } // Run the shortcode function $shortcode_function = $shortcode; if ('' !== ($result = $this->{$shortcode_function}($atts, $content))) { if ('' != $atts['find']) { $result = str_replace($atts['find'], $atts['replace'], $result); } return $atts['before'] . $result . $atts['after']; } return ''; }
} else { ?> <p class="woocommerce-info"><?php echo esc_html($info_message); ?> <a href="#" class="showlogin"><?php _e('Click here to login', 'woocommerce'); ?> </a></p> <?php } ?> <?php woocommerce_login_form(array('message' => __('If you have shopped with us before, please enter your details in the boxes below. If you are a new customer please proceed to the Billing & Shipping section.', 'woocommerce'), 'redirect' => get_permalink(woocommerce_get_page_id('checkout')), 'hidden' => true)); } ?> </div><!-- .large-12 --> </div> <form name="checkout" method="post" class="checkout woocommerce-checkout" action="<?php echo esc_url($get_checkout_url); ?> " enctype="multipart/form-data"> <div id="customer_details"> <div class="row">
do_action('woocommerce_before_checkout_form', $checkout); ?> <div id="checkout-wrapper" class="timeline-<?php echo $display; ?> "> <div id="checkout_coupon" class="woocommerce_checkout_coupon"> <?php do_action('yith_woocommerce_checkout_coupon', $checkout); ?> </div> <div id="checkout_login" class="woocommerce_checkout_login"> <?php woocommerce_login_form(array('message' => __('<h2>LOG IN</h2>', 'woocommerce'), 'redirect' => wc_get_page_permalink('checkout'), 'hidden' => false)); ?> </div> <?php // If checkout registration is disabled and not logged in, the user cannot checkout if (!$checkout->enable_signup && !$checkout->enable_guest_checkout && !is_user_logged_in()) { echo apply_filters('woocommerce_checkout_must_be_logged_in_message', __('You must be logged in to checkout.', 'woocommerce')); return; } // filter hook for include new pages inside the payment method $get_checkout_url = apply_filters('woocommerce_get_checkout_url', WC()->cart->get_checkout_url()); ?> <form name="checkout" method="post" class="checkout woocommerce-checkout" action="<?php echo esc_url($get_checkout_url);
<?php function curPageURL() { $pageURL = 'http'; if (@$_SERVER["HTTPS"] == "on") { $pageURL .= "s"; } $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; } return $pageURL; } woocommerce_login_form(array('message' => 'Please login or create an account to complete your order.', 'redirect' => curPageURL(), 'hidden' => true)); $result = unserialize(WC()->session->RESULT); $email = !empty($_POST['email']) ? $_POST['email'] : $result['EMAIL']; ?> </form> <div class="title"> <h2><?php _e('Create A New Account', 'woocommerce'); ?> </h2> </div> <form action="" method="post"> <p class="form-row form-row-first"> <label for="paypalexpress_order_review_username">Username:<span class="required">*</span></label> <input style="width: 100%;" type="text" name="username" id="paypalexpress_order_review_username" value="" /> </p>
<?php /** * Checkout login form * * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly if (is_user_logged_in() || !$checkout->enable_signup) { return; } $info_message = apply_filters('woocommerce_checkout_login_message', __('Existing customer.', 'thefoxwp')); ?> <div id="rd_login_form"> <h2><?php echo esc_html($info_message); ?> </h2> <?php woocommerce_login_form(array('message' => '', 'redirect' => get_permalink(woocommerce_get_page_id('checkout')), 'hidden' => true)); ?> </div>
/** * Checkout login form * * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-login.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer). * will need to copy the new files to your theme to maintain compatibility. We try to do this. * as little as possible, but it does happen. When this occurs the version of the template file will. * be bumped and the readme will list any important changes. * * @see http://docs.woothemes.com/document/template-structure/ * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; // Exit if accessed directly } if (is_user_logged_in() || 'no' === get_option('woocommerce_enable_checkout_login_reminder')) { return; } $info_message = apply_filters('woocommerce_checkout_login_message', __('Returning customer?', 'woocommerce')); $info_message .= ' <a href="#" class="showlogin">' . __('Click here to login', 'woocommerce') . '</a>'; wc_print_notice($info_message, 'notice'); ?> <?php woocommerce_login_form(array('message' => __('Si vous avez acheté des produits avec nous avant, s\'il vous plaît entrer vos coordonnées dans les champs ci-dessous. Si vous êtes un nouveau client, s\'il vous plaît passez à la section de facturation et de livraison.', 'woocommerce'), 'redirect' => wc_get_page_permalink('checkout'), 'hidden' => true));
<div class="col-top"> <?php global $woocommerce; $cart_url = $woocommerce->cart->get_cart_url(); echo '<a href="' . $cart_url . '" class="gotocart">Back to Shopping Cart</a>'; ?> <?php if (!is_user_logged_in()) { $info_message = apply_filters('woocommerce_checkout_login_message', '<a href="#" class="showlogin">' . __('Returning Customer? Login Here', 'woocommerce') . '</a>'); echo $info_message; } ?> <div class="clear"></div> <?php woocommerce_login_form(array('redirect' => wc_get_page_permalink('checkout'), 'hidden' => true)); ?> </div> <form name="checkout" method="post" class="checkout woocommerce-checkout" action="<?php echo esc_url($get_checkout_url); ?> " enctype="multipart/form-data"> <?php if (sizeof($checkout->checkout_fields) > 0) { ?> <div class="col2-set" id="customer_details">
} $info_message = apply_filters('woocommerce_checkout_login_message', __('Returning customer?', 'vibe')); $info_message .= ' <a href="#" class="showlogin">' . __('Click here to login', 'vibe') . '</a>'; wc_print_notice($info_message, 'notice'); ?> <div class="step step1"> <div class="one_half"> <div class="column_content first"> <h3 class="heading"> <?php _e('Returning Customer', 'vibe'); ?> </h3> <?php woocommerce_login_form(array('message' => __('If you have shopped with us before, please enter your details in the boxes below.', 'vibe'), 'redirect' => get_permalink(wc_get_page_id('checkout')), 'hidden' => true)); ?> </div> </div> <?php if (!is_user_logged_in()) { $get_checkout_url = apply_filters('woocommerce_get_checkout_url', WC()->cart->get_checkout_url()); ?> <form name="checkout" method="post" class="checkout" action="<?php echo esc_url($get_checkout_url); ?> "> <div class="one_half"> <div class="column_content"> <h3 class="heading"><?php
<?php /** * Checkout Login Form */ if (is_user_logged_in()) { return; } if (get_option('woocommerce_enable_signup_and_login_from_checkout') == "no") { return; } $info_message = apply_filters('woocommerce_checkout_login_message', __('Already registered?', 'woothemes')); ?> <p class="info"><?php echo $info_message; ?> <a href="#" class="showlogin"><?php _e('Click here to login', 'woothemes'); ?> </a></p> <?php woocommerce_login_form(__('If you have shopped with us before, please enter your username and password in the boxes below. If you are a new customer please proceed to the Billing & Shipping section.', 'woothemes'));
/** * Checkout login form * * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-login.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer). * will need to copy the new files to your theme to maintain compatibility. We try to do this. * as little as possible, but it does happen. When this occurs the version of the template file will. * be bumped and the readme will list any important changes. * * @see http://docs.woothemes.com/document/template-structure/ * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; // Exit if accessed directly } if (is_user_logged_in() || 'no' === get_option('woocommerce_enable_checkout_login_reminder')) { return; } $info_message = apply_filters('woocommerce_checkout_login_message', __('Returning customer?', 'woocommerce')); $info_message .= ' <a href="#" class="showlogin">' . __('Click here to login', 'woocommerce') . '</a>'; wc_print_notice($info_message, 'notice'); ?> <?php woocommerce_login_form(array('message' => __('If you have shopped with us before, please enter your details in the boxes below. If you are a new customer, please proceed to the Billing Details below. Thank you!', 'woocommerce'), 'redirect' => wc_get_page_permalink('checkout'), 'hidden' => true));
/** * @param string $message * @param string $redirect * @param array $data */ function hwoo_login_form($message = '', $redirect = '', $data = array()) { $args = func_get_args(); $data = end($args); if ($message) { $data['message'] = $message; } if ($redirect) { $data['redirect'] = $redirect ? true : false; } if (!isset($data['hidden'])) { $data['hidden'] = true; } woocommerce_login_form($data); }
<?php /** * Checkout login form * * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; // Exit if accessed directly } do_action('woocommerce_after_checkout_form', $checkout); if (is_user_logged_in() || 'no' === get_option('woocommerce_enable_checkout_login_reminder')) { return; } $info_message = '<a href="#" class="ui right floated button showlogin">' . __('Click here to login', 'woocommerce') . '</a>'; $info_message .= '<p>' . apply_filters('woocommerce_checkout_login_message', __('Returning customer? Please login before placing your order.', 'woocommerce')) . '</p>'; wc_print_notice($info_message, 'notice'); woocommerce_login_form(['message' => __('If you have shopped with us before please login below. If you are a new customer please proceed to place your order and an account will be created for you.', 'woocommerce'), 'redirect' => wc_get_page_permalink('checkout'), 'hidden' => true]);
<div class="clear"></div> </div> <div class="span5 offset2"> <h5><?php _e('Returning Customers', ETHEME_DOMAIN); ?> </h5> <p><?php _e('If you have shopped with us before, please enter your details in the boxes below. If you are a new customer please proceed to the Billing & Shipping section.', ETHEME_DOMAIN); ?> </p> <?php if (!is_user_logged_in() || $checkout->enable_signup) { woocommerce_login_form(array('redirect' => get_permalink(woocommerce_get_page_id('checkout')), 'hidden' => false)); } ?> <?php remove_action('woocommerce_before_checkout_form', 'woocommerce_checkout_login_form', 10); // remove login form before checkout ?> <?php do_action('woocommerce_before_checkout_form', $checkout); // COUPON FORM ?> </div> </div>
<?php /** * Checkout login form * * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly if (is_user_logged_in() || !$checkout->enable_signup) { return; } $checkout_page = ""; if (version_compare(WOOCOMMERCE_VERSION, "2.1.0") >= 0) { $checkout_page = get_permalink(wc_get_page_id('checkout')); } else { $checkout_page = get_permalink(woocommerce_get_page_id('checkout')); } $info_message = apply_filters('woocommerce_checkout_login_message', __('Returning customer?', 'woocommerce')); ?> <?php woocommerce_login_form(array('message' => '', 'redirect' => $checkout_page, 'hidden' => false));
/** * Checkout login form * * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-login.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer). * will need to copy the new files to your theme to maintain compatibility. We try to do this. * as little as possible, but it does happen. When this occurs the version of the template file will. * be bumped and the readme will list any important changes. * * @see http://docs.woothemes.com/document/template-structure/ * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; // Exit if accessed directly } if (is_user_logged_in() || 'no' === get_option('woocommerce_enable_checkout_login_reminder')) { return; } $info_message = apply_filters('woocommerce_checkout_login_message', __('Returning customer?', 'woocommerce')); $info_message .= ' <a href="#" class="showlogin">' . __('Click here to login', 'woocommerce') . '</a>'; wc_print_notice($info_message, 'notice'); ?> <?php woocommerce_login_form(array('message' => __('If you have consulted with our doctors before, please enter your details in the boxes below to log in to your account. If you are a new patient, please proceed to the Patient Intake Form.', 'woocommerce'), 'redirect' => wc_get_page_permalink('checkout'), 'hidden' => true));