ASTRA_Ext_WooCommerce_Markup::localize_variables_shop_page( array $localize_vars )

Add Localize variables


Description


Parameters

$localize_vars

(array) (Required) Localize variables array.


Return

(array)


Source

File: addons/woocommerce/classes/class-astra-ext-woocommerce-markup.php

		public function localize_variables_shop_page( $localize_vars ) {

			/**
			 * Stick Header meta option for shop page
			 */
			if ( is_shop() ) {
				$shop_page_id                             = get_option( 'woocommerce_shop_page_id' );
				$localize_vars['stick_header_meta']       = get_post_meta( $shop_page_id, 'stick-header-meta', true );
				$localize_vars['header_main_stick_meta']  = get_post_meta( $shop_page_id, 'header-main-stick-meta', true );
				$localize_vars['header_above_stick_meta'] = get_post_meta( $shop_page_id, 'header-above-stick-meta', true );
				$localize_vars['header_below_stick_meta'] = get_post_meta( $shop_page_id, 'header-below-stick-meta', true );
			}
			// Accessibility Text.
			$localize_vars['product_plus_minus_text'] = array(
				'plus_qty'  => __( 'Plus Quantity', 'astra-addon' ),
				'minus_qty' => __( 'Minus Quantity', 'astra-addon' ),
			);
			return $localize_vars;
		}

User Contributed Notes

You must log in before being able to contribute a note or feedback.