SILENT KILLERPanel

Current Path: > home > codekrsu > > cuddlebuds.lk > wp-content > plugins > woocommerce > src > > Blocks > Templates


Operation   : Linux premium131.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
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//cuddlebuds.lk/wp-content/plugins/woocommerce/src//Blocks/Templates

NameTypeSizeLast ModifiedActions
AbstractPageTemplate.php File 1855 bytes August 27 2024 23:04:44.
AbstractTemplate.php File 596 bytes March 26 2024 16:56:02.
AbstractTemplateCompatibility.php File 5894 bytes March 03 2025 22:28:12.
AbstractTemplatePart.php File 332 bytes March 26 2024 16:56:02.
ArchiveProductTemplatesCompatibility.php File 12726 bytes September 23 2024 20:44:04.
CartTemplate.php File 2434 bytes April 30 2024 19:35:34.
CheckoutHeaderTemplate.php File 863 bytes March 26 2024 16:56:02.
CheckoutTemplate.php File 2477 bytes April 30 2024 19:35:34.
ClassicTemplatesCompatibility.php File 2430 bytes May 12 2025 21:07:28.
ComingSoonSocialLinksTemplate.php File 1132 bytes December 18 2024 22:19:16.
ComingSoonTemplate.php File 2642 bytes May 12 2025 21:07:28.
ExternalProductAddToCartWithOptionsTemplate.php File 1021 bytes June 23 2025 19:46:28.
GroupedProductAddToCartWithOptionsTemplate.php File 1016 bytes June 23 2025 19:46:28.
MiniCartTemplate.php File 1714 bytes April 30 2024 19:35:34.
OrderConfirmationTemplate.php File 1618 bytes August 27 2024 23:04:44.
ProductAttributeTemplate.php File 2515 bytes May 12 2025 21:07:28.
ProductCatalogTemplate.php File 2406 bytes January 21 2025 18:53:44.
ProductCategoryTemplate.php File 1784 bytes September 23 2024 20:44:04.
ProductSearchResultsTemplate.php File 2158 bytes May 12 2025 21:07:28.
ProductTagTemplate.php File 1764 bytes September 23 2024 20:44:04.
SimpleProductAddToCartWithOptionsTemplate.php File 1011 bytes June 23 2025 19:46:28.
SingleProductTemplate.php File 9516 bytes June 30 2025 17:49:22.
SingleProductTemplateCompatibility.php File 14988 bytes March 03 2025 22:28:12.
VariableProductAddToCartWithOptionsTemplate.php File 1021 bytes June 23 2025 19:46:28.

Reading File: /home/codekrsu//cuddlebuds.lk/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;
	}
}

SILENT KILLER Tool