• Resolved raits515

    (@raits515)


    Hi there

    We have an error warning on products page with WooCommerce.

    Message: call_user_func_array() expects parameter 1 to be a valid callback, function ‘select_variations’ not found or invalid function name

    Location:
    wp-includes/class-wp-hook.php:307
    do_action(‘woocommerce_after_add_to_cart_button’)
    wp-content/plugins/woocommerce/templates/single-product/add-to-cart/variation-add-to-cart-button.php:33
    wc_get_template()
    wp-content/plugins/woocommerce/includes/wc-template-functions.php:3034
    woocommerce_single_variation_add_to_cart_button()
    wp-includes/class-wp-hook.php:307
    do_action(‘woocommerce_single_variation’)
    wp-content/plugins/woocommerce/templates/single-product/add-to-cart/variable.php:71
    wc_get_template()
    wp-content/plugins/woocommerce/includes/wc-template-functions.php:1721
    woocommerce_variable_add_to_cart()
    wp-includes/class-wp-hook.php:307
    do_action(‘woocommerce_variable_add_to_cart’)
    wp-content/plugins/woocommerce/includes/wc-template-functions.php:1667
    woocommerce_template_single_add_to_cart()
    wp-includes/class-wp-hook.php:307
    do_action(‘woocommerce_single_product_summary’)
    wp-content/plugins/genesis-connect-woocommerce/templates/single-product.php:62
    gencwooc_single_product_loop()
    wp-includes/class-wp-hook.php:307
    do_action(‘genesis_loop’)
    wp-content/themes/genesis/lib/framework.php:66
    genesis()
    wp-content/plugins/genesis-connect-woocommerce/templates/single-product.php:77

    Could you help to understand what it means and how do fix?

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Paulo P – a11n

    (@paulostp)

    Hello,

    Thanks for reaching out!

    This sort of issue may be caused by a conflict with your theme or a plugin. In order to address it, I would start by suggesting that you create a staging site if you don’t have one yet. Using WP Staging you will be able to clone your site and troubleshoot without affecting your live site.

    Then, once you have the staging site, I would suggest you perform a conflict test:

    • change your theme to Storefront
    • disable all plugins except for WooCommerce
    • check if the problem persists

    Please let us know if the issue persists. If the issue is gone, then you can reactivate your theme and plugins one by one until you identify the culprit.

    Let us know how it goes!

    Thread Starter raits515

    (@raits515)

    Hi there,

    Yeah, that worked.

    Luckily it was in the first 10th of the plugin.

    The following code caused in code snippets caused it:

    add_action( ‘woocommerce_after_add_to_cart_button’, ‘select_variations’, 5 );

    Thanks for letting us know.

    I’ll mark this thread as resolved now. If you have any further questions, I recommend creating a new thread.

    Best.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP warning call_user_func_array() expects parameter 1’ is closed to new replies.