auto-patch 638-dev-dev01-2024-05-14T20_44_36
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
use Automattic\Jetpack\Constants;
|
||||
use Automattic\WooCommerce\Internal\Utilities\HtmlSanitizer;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
@@ -896,10 +897,11 @@ function wc_terms_and_conditions_page_content() {
|
||||
return;
|
||||
}
|
||||
|
||||
$page = get_post( $terms_page_id );
|
||||
$sanitizer = wc_get_container()->get( HtmlSanitizer::class );
|
||||
$page = get_post( $terms_page_id );
|
||||
|
||||
if ( $page && 'publish' === $page->post_status && $page->post_content && ! has_shortcode( $page->post_content, 'woocommerce_checkout' ) ) {
|
||||
echo '<div class="woocommerce-terms-and-conditions" style="display: none; max-height: 200px; overflow: auto;">' . wc_format_content( wp_kses_post( $page->post_content ) ) . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo '<div class="woocommerce-terms-and-conditions" style="display: none; max-height: 200px; overflow: auto;">' . wc_format_content( $sanitizer->styled_post_content( $page->post_content ) ) . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1245,6 +1247,15 @@ if ( ! function_exists( 'woocommerce_template_loop_category_link_close' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'woocommerce_product_taxonomy_archive_header' ) ) {
|
||||
/**
|
||||
* Output the products header on taxonomy archives.
|
||||
*/
|
||||
function woocommerce_product_taxonomy_archive_header() {
|
||||
wc_get_template( 'loop/header.php' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'woocommerce_taxonomy_archive_description' ) ) {
|
||||
/**
|
||||
* Show an archive description on taxonomy archives.
|
||||
|
||||
Reference in New Issue
Block a user