27 lines
549 B
PHP
27 lines
549 B
PHP
<?php
|
|
|
|
namespace Actions;
|
|
|
|
use ofc\RadAction;
|
|
|
|
class WooCommerceShopLayout extends RadAction
|
|
{
|
|
protected string $hookName = "woocommerce_before_main_content";
|
|
protected int $priority = 5;
|
|
|
|
public function callback()
|
|
{
|
|
if (!is_shop()) {
|
|
return;
|
|
}
|
|
|
|
// shop page
|
|
echo site()->render("shop-top", site()->getPost(wc_get_page_id('shop'), [
|
|
"headline",
|
|
"intro_text",
|
|
"thumbnail",
|
|
]));
|
|
echo site()->render('woocommerce-before-content');
|
|
}
|
|
}
|