• Resolved db4wporg

    (@db4wporg)


    In admin when I click any page to edit it I get an error. Everything else in admin and on the site works fine. I have turned off Litespeed cache plugin and cleared cookies and browser cache. I overwrote the files named as problems in the error log. All plugins, theme and WP are up to date.

    From the error log:

    [10-Oct-2025 17:12:17 UTC] PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function “new_loop_shop_per_page” not found or invalid function name in /home/kahobgyd/thesunmaker.com/wp-includes/class-wp-hook.php:324
    Stack trace: 0 /home/kahobgyd/thesunmaker.com/wp-includes/plugin.php(205): WP_Hook->apply_filters() 1 /home/kahobgyd/thesunmaker.com/wp-content/plugins/woocommerce/includes/class-wc-query.php(534): apply_filters() 2 /home/kahobgyd/thesunmaker.com/wp-content/plugins/woocommerce/includes/class-wc-query.php(420): WC_Query->product_query() 3 /home/kahobgyd/thesunmaker.com/wp-includes/class-wp-hook.php(324): WC_Query->pre_get_posts() 4 /home/kahobgyd/thesunmaker.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 5 /home/kahobgyd/thesunmaker.com/wp-includes/plugin.php(565): WP_Hook->do_action() 6 /home/kahobgyd/thesunmaker.com/wp-includes/class-wp-query.php(1910): do_action_ref_array() 7 /home/kahobgyd/thesunmaker.com/wp-includes/class-wp-query.php(3949): WP_Query->get_posts() 8 /home/kahobgyd/thesunmaker.com/wp-includes/class-wp.php(701): WP_Query->query() 9 /home/kahobgyd/thesunmaker.com/wp-includes/class-wp.php(821): WP->query_posts() 10 /home/kahobgyd/thesunmaker.com/wp-includes/functions.php(1342): WP->main() 11 /home/kahobgyd/thesunmaker.com/wp-blog-header.php(16): wp() 12 /home/kahobgyd/thesunmaker.com/index.php(17): require(‘/home/kahobgyd/…’) 13 {main}

    thrown in /home/kahobgyd/thesunmaker.com/wp-includes/class-wp-hook.php on line 324

Viewing 3 replies - 1 through 3 (of 3 total)
  • WooCommerce is try to run a filter or action hooked for non existing function named new_loop_shop_per_page.
    That’s what’s breaking your page edit screen.

    this issue is happen for likely function name was removed or renamed, but the filter hook remains in the database or code.

    Moderator threadi

    (@threadi)

    The function name new_loop_shop_per_page appears in a WooCommerce guide on customizing the product loop: https://woocommerce.com/document/change-number-of-products-displayed-per-page/

    This is not a function from any plugin. I therefore suspect that somewhere in your project there is a customization that tries to call this function name, but the function no longer exists. You need to find and adjust this location. Possible locations could be:

    • A code snippet plugin where you can store such codes.
    • The functions.php of the theme, if it is a child theme.
    • An ill-considered adjustment to some core or plugin file.
    Thread Starter db4wporg

    (@db4wporg)

    I removed the action from the functions.php file that apparently became outdated recently. I’ve been running auto updates and everything was looking good on the front end. Everything works great now.

    Thanks for your quick responses!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.