Код: Выделить всё
add_action( 'woocommerce_cart_is_empty', 'custom_empty_cart_message', 10 );
function custom_empty_cart_message() {
$html = 'Cart';
$html .= '
';
$html .= 'Your cart is currently empty.
';
$html .= '
[img]https://myurl.com/wp-content/uploads/2024/04/empty_bento.jpeg[/img]
';
echo $html . '';
echo do_shortcode( '[woo_product_slider id="2994"]' );
}
Если я вручную обновлю страницу во второй раз, все загрузится правильно и работает.
Как я могу успешно отобразить шорткод при первой перезагрузке страницы?
Подробнее здесь: https://stackoverflow.com/questions/783 ... load-issue
Мобильная версия