Automattic\WooCommerce\Blocks\Templates

VariableProductAddToCartWithOptionsTemplate{}WC 1.0

VariableProductAddToCartWithOptionsTemplate class.

Хуков нет.

Использование

$VariableProductAddToCartWithOptionsTemplate = new VariableProductAddToCartWithOptionsTemplate();
// use class methods

Методы

  1. public get_template_description()
  2. public get_template_title()
  3. public init()

Код VariableProductAddToCartWithOptionsTemplate{} WC 9.8.5

class VariableProductAddToCartWithOptionsTemplate extends AbstractTemplatePart {

	/**
	 * The slug of the template.
	 *
	 * @var string
	 */
	const SLUG = 'variable-product-add-to-cart-with-options';

	/**
	 * The template part area where the template part belongs.
	 *
	 * @var string
	 */
	public $template_area = 'add-to-cart-with-options';

	/**
	 * Initialization method.
	 */
	public function init() {
	}

	/**
	 * Returns the title of the template.
	 *
	 * @return string
	 */
	public function get_template_title() {
		return _x( 'Variable Product Add to Cart with Options', 'Template name', 'woocommerce' );
	}

	/**
	 * Returns the description of the template.
	 *
	 * @return string
	 */
	public function get_template_description() {
		return __( 'Template used to display the Add to Cart with Options form for Variable Products.', 'woocommerce' );
	}
}