ASTRA_Ext_WooCommerce_Markup::checkout_js_localize( array $localize )
Localize variables for checkout.
Description
Parameters
- $localize
-
(array) (Required) JS localize variables.
Return
(array)
Source
File: addons/woocommerce/classes/class-astra-ext-woocommerce-markup.php
public function checkout_js_localize( $localize ) { $wc_checkout = new WC_Checkout(); $localize['order_review_toggle_texts'] = array( 'toggle_show_text' => order_review_toggle_texts(), 'toggle_hide_text' => order_review_toggle_texts( 'hide_text' ), ); $localize['check_email_exist_nonce'] = wp_create_nonce( 'check-email-exist' ); $localize['woocommerce_login_nonce'] = wp_create_nonce( 'woocommerce-login' ); $localize['is_logged_in'] = is_user_logged_in(); $localize['email_validation_msgs'] = array( 'error_msg' => __( 'Entered email address is not a valid email.', 'astra-addon' ), 'success_msg' => __( 'This email is already registered. Please enter the password to continue.', 'astra-addon' ), ); $localize['checkout_order_review_sticky'] = astra_get_option( 'checkout-order-review-sticky' ); $localize['cartflows_version'] = defined( 'CARTFLOWS_VER' ); $localize['is_registration_required'] = $wc_checkout->is_registration_required(); return $localize; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
3.9.0 | Introduced. |