| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template used when a WooCommerce product or product category is password-protected. |
| 4 |
* Mirrors WooCommerce's archive-product.php structure exactly, replacing only the |
| 5 |
* product loop section with the Passster password form. |
| 6 |
* |
| 7 |
* @package Passster |
| 8 |
*/ |
| 9 |
|
| 10 |
defined( 'ABSPATH' ) || exit; |
| 11 |
|
| 12 |
get_header( 'shop' ); |
| 13 |
|
| 14 |
/** |
| 15 |
* Hook: woocommerce_before_main_content. |
| 16 |
* |
| 17 |
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) |
| 18 |
*/ |
| 19 |
do_action( 'woocommerce_before_main_content' ); |
| 20 |
|
| 21 |
?> |
| 22 |
<header class="woocommerce-products-header"> |
| 23 |
<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?> |
| 24 |
<h1 class="woocommerce-products-header__title page-title"><?php woocommerce_page_title(); ?></h1> |
| 25 |
<?php endif; ?> |
| 26 |
|
| 27 |
<?php |
| 28 |
/** |
| 29 |
* Hook: woocommerce_archive_description. |
| 30 |
* |
| 31 |
* @hooked woocommerce_taxonomy_archive_description - 10 |
| 32 |
* @hooked woocommerce_product_archive_description - 10 |
| 33 |
*/ |
| 34 |
do_action( 'woocommerce_archive_description' ); |
| 35 |
?> |
| 36 |
</header> |
| 37 |
|
| 38 |
<?php |
| 39 |
|
| 40 |
echo \passster\PS_Category_Lock::get_woo_protected_form(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 41 |
|
| 42 |
/** |
| 43 |
* Hook: woocommerce_after_main_content. |
| 44 |
* |
| 45 |
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content) |
| 46 |
*/ |
| 47 |
do_action( 'woocommerce_after_main_content' ); |
| 48 |
|
| 49 |
/** |
| 50 |
* Hook: woocommerce_sidebar. |
| 51 |
* |
| 52 |
* @hooked woocommerce_get_sidebar - 10 |
| 53 |
*/ |
| 54 |
do_action( 'woocommerce_sidebar' ); |
| 55 |
|
| 56 |
get_footer( 'shop' ); |
| 57 |
|