Astra_Woocommerce::store_sidebar_layout( String $sidebar_layout )
WooCommerce Container
Description
Parameters
- $sidebar_layout
-
(String) (Required) Layout type.
Return
(String) $sidebar_layout Layout type.
Source
File: inc/compatibility/woocommerce/class-astra-woocommerce.php
public function store_sidebar_layout( $sidebar_layout ) { if ( is_shop() || is_product_taxonomy() || is_checkout() || is_cart() || is_account_page() ) { $woo_sidebar = astra_get_option( 'woocommerce-sidebar-layout' ); if ( 'default' !== $woo_sidebar ) { $sidebar_layout = $woo_sidebar; } if ( is_shop() ) { $shop_page_id = get_option( 'woocommerce_shop_page_id' ); $shop_sidebar = get_post_meta( $shop_page_id, 'site-sidebar-layout', true ); } elseif ( is_product_taxonomy() ) { $shop_sidebar = 'default'; } else { $shop_sidebar = astra_get_option_meta( 'site-sidebar-layout', '', true ); } if ( 'default' !== $shop_sidebar && ! empty( $shop_sidebar ) ) { $sidebar_layout = $shop_sidebar; } } return $sidebar_layout; }
Expand full source code Collapse full source code View on Trac