You've already forked wc-bootstrap
-
WooCommerce Bootstrap 0.1.4
Pre-Releasereleased this
2026-03-01 00:02:53 +00:00 | 2 commits to main since this releaseSecurity
- fn() function whitelist (
WooCommerceExtension): ThecallFunction()method (exposed asfn()in Twig templates) now restricts callable functions to an explicitALLOWED_FUNCTIONSwhitelist. Previously any PHP function could be called, risking arbitrary code execution if template context were compromised. Only the 6 functions actually used in templates are permitted. - Notice data attribute escaping: Changed
{{ notice.data|raw }}to{{ notice.data|wp_kses_post }}in success, error, and notice Twig templates. Defense-in-depth against potential XSS via data attributes. - Search query escaping (
product-searchform.html.twig): Added|esc_attrfilter toget_search_query()output in the search input value attribute.
Performance
- Per-request ContextBuilder caching: New
wc_bootstrap_get_theme_context()function with static variable caching eliminates redundantContextBuilder::build()calls (10-20 DB queries each) when multiple WooCommerce render functions fire in the same request.
Changed
- Shared page shell helper: New
wc_bootstrap_render_in_page_shell()function extracts the duplicated context-injection-and-render pattern fromwc_bootstrap_render_page(),wc_bootstrap_render_product_archive(), andwc_bootstrap_render_single_product(). - Removed unused constants: Removed
WC_BOOTSTRAP_VERSIONandWC_BOOTSTRAP_URLconstants that were defined but never referenced.
Downloads
- fn() function whitelist (