Astra_After_Setup_Theme::astra_enforce_woo_shortcode_pages( array $pages_data )

Enforce WooCommerce shortcode pages due to following reasons.


Description

  1. In WooCommerce 8.3 version cart & checkout pages are directly added with blocks and not with shortcodes.
  2. Due to which most of Astra extended features are not working on cart & checkout pages.

This is temporary workaround, once Astra ready with WooCommerce 8.3 version, this will be removed.


Parameters

$pages_data

(array) (Required) Array of WooCommerce pages.


Return

(array)


Source

File: inc/class-astra-after-setup-theme.php

		public function astra_enforce_woo_shortcode_pages( $pages_data ) {
			$pages_data['cart']['content']     = '<!-- wp:shortcode -->[woocommerce_cart]<!-- /wp:shortcode -->';
			$pages_data['checkout']['content'] = '<!-- wp:shortcode -->[woocommerce_checkout]<!-- /wp:shortcode -->';

			return $pages_data;
		}

Changelog

Changelog
Version Description
4.5.1 Introduced.

User Contributed Notes

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