• Resolved vendidero

    (@vendidero)


    Hi there,

    seems like your plugin has a filter setup in WCML_Store_Pages::init():

    add_filter( 'woocommerce_create_page_id', [ $this, 'check_store_page_id' ], 10, 3 );

    check_store_page_id does not exist as a method in this class which leads to a fatal error being thrown whenever wc_create_page is being used. Please fix that issue asap as this effects other plugins. Example stack:

    PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($function) must be a valid callback, class WCML_Store_Pages does not have a method "check_store_page_id" in /xxx/wp-includes/class-wp-hook.php:307
    Stack trace:
    
    0 /xxx/wp-includes/plugin.php(191): WP_Hook->apply_filters()
    1 /xxx/wp-content/plugins/woocommerce/includes/admin/wc-admin-functions.php(92): apply_filters()
    2 /xxx/wp-content/plugins/woocommerce-germanized/includes/updates/woocommerce-gzd-update-3.9.3.php(20): wc_create_page()

    Cheers

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pierre Sylvestre

    (@strategio)

    Hi @vendidero,

    Thanks for the report!

    It seems that the method has been missing for a while (not only in the latest version) and our numerous tests did not catch it.

    Of course we will fix it ASAP, but would you have some real test steps in order to reproduce the issue? Maybe you are using a specific 3rd party plugin?

    Thanks,
    Pierre

    Thread Starter vendidero

    (@vendidero)

    Hi Pierre,

    thanks.

    but would you have some real test steps in order to reproduce the issue? Maybe you are using a specific 3rd party plugin?

    Just call:

    wc_create_page( 'test', 'test_option', 'Test title' );

    from a test script and the error will occur. The function is being called during a clean (missing db version) Woo install (in case core pages like the checkout page are missing).

    Cheers

    Plugin Author David Garcia Watkins

    (@dgwatkins)

    It is indeed an old leftover as Pierre mentioned.

    If it’s blocking you, you can safely remove line 70 from inc/class-wcml-store-pages.php

    Our next bugfix release 5.0.1 (most probably next week) will address the issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal Error: WCML_Store_Pages does not have a method “check_store_page_id”’ is closed to new replies.