functions.php
Код: Выделить всё
add_filter('woocommerce_product_loop_start', 'add_data_page_to_products_list');
function add_data_page_to_products_list($output){
// Use regex to match the opening tag and add the data-page="1" attribute
$output = preg_replace('/
Подробнее здесь: [url]https://stackoverflow.com/questions/79023360/back-to-prev-page-product-position-in-woocommerce-infinit-scroll[/url]