Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Latest commit

 

History

History
19 lines (10 loc) · 983 Bytes

classic-template.md

File metadata and controls

19 lines (10 loc) · 983 Bytes

📣 Announcement: New documentation location

The documentation for WooCommerce Blocks has moved to the WooCommerce monorepo.

Please refer to the documentation in the new location as the files in this repository will no longer be updated and the repository will be archived.


ClassicTemplate.php

The ClassicTemplate is a class used to set up the Classic Template block on the server-side, and render the correct template.

Overview

From this file, we enqueue the front-end scripts necessary to enable dynamic functionality, such as the product gallery, add to basket etc.

From the render() method we inspect the $attributes object for a template property which helps determine which core PHP templating code to execute (e.g. single-product) for the front-end views.

Classic Block Template Attribute