Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Warning: call_user_func_array() [function.call-user-func-array]

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Warning: call_user_func_array() [function.call-user-func-array]

  • This topic has 10 replies, 2 voices, and was last updated 13 years, 12 months ago by scotman.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • May 14, 2011 at 9:25 am #3408
    scotman
    Member

    I thought I had this fixed but for some reason I am getting this error. Here is what I have done so far…

    1. I’m trying to create a html sales-page via the directions found here http://www.tipsandtricks-hq.com/how-to-create-and-use-custom-page-template-in-wordpress-to-create-a-sales-page-2095

    2. I followed the directions and used the php code found within the tutorial. But it gives me an error at the header and footer area of

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘Array’ was given in /home/nicheweb/public_html/webcontentcourse.com/member/wp-includes/plugin.php on line 395

    3. I removed the header and footer, plus content php in the sale-page template. It produces no errors but it doesn’t lock out users when I use the domain level lock feature.

    4. I then added the code <?php echo print_eStore_buy_now_button(5); ?> which my product Im trying to sell is id 5. Everything works fine except the domain lock.

    5. That had me wondering if other features of wp-estore would not be available after the user bought the product. So I re-added the header and footer code and I’m back where I began Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘Array’ was given in /home/nicheweb/public_html/webcontentcourse.com/member/wp-includes/plugin.php on line 395

    My question is the sales page works without the header, content and footer php code in the sale-page.php template and calls correctly when I assign it as a template on the wp-admin page settings. The buy now button even works and redirects me to Paypal but will the rest of the wp-estore functions work after the user makes the purchase without the header, content and footer code removed?

    Here is the page with errors… http://webcontentcourse.com/member/seo-revealed/

    p.s. I have downloaded the latest releases of wp-estore, affilaite platform and e-member and I’m still getting this error.

    May 15, 2011 at 12:22 am #32499
    amin007
    Participant

    The plugins will work on any WordPress post or page that has a valid structure and is part of WordPress. The header call needs to be there for some WordPress plugins that will insert data into the header. So what we need to identify is what causes the error to show up.

    Can you please tell me the function calls that you have placed on this custom template file including the header call?

    When I go to the page that you mentioned I don’t see any error. I see the eMember login prompt.

    May 15, 2011 at 9:21 am #32500
    scotman
    Member

    What I did was I added in the header and footer code as per your instructions.

    ‘<?php

    error_reporting(0);

    /*

    Template Name: Sales Page

    */

    wp_head();

    ?>’

    ‘<?php echo print_eStore_buy_now_button(5); ?>’

    ‘<?php

    /*

    Template Name: Sales Page

    */

    wp_footer();

    ?>’

    May 15, 2011 at 9:23 am #32501
    scotman
    Member

    I forgot to add I added in the error reporting code to silence the error in the meantime.

    But that is the code I have added to the php file. And it throws ‘Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘Array’ was given in /home/nicheweb/public_html/webcontentcourse.com/member/wp-includes/plugin.php on line 395′

    May 15, 2011 at 9:32 am #32502
    scotman
    Member

    Alright I unlocked the domain so we can work on this. Plus I removed the error reporting code.

    May 15, 2011 at 11:28 pm #32503
    amin007
    Participant

    Unfortunately the warning actually does not tell us which plugin might be causing this so we will need to go the long way to find out which plugin is causing it. Can you please do this test mentioned here to see if you can identify which plugin make the warning go away?

    Test to (How to) Identify a Conflicting Theme or Plugin

    I also noticed you have the following block of code twice in the template. Why is that?

    /*
    Template Name: Sales Page
    */

    Also, before you do the test mentioned above get a fresh build of the plugins that you are using from here:

    https://support.tipsandtricks-hq.com/update-request

    If there is a case of a file getting corrupt then this will take care of it.

    May 16, 2011 at 6:07 pm #32504
    scotman
    Member

    Alright here is what I did I removed that extra line of duplicate code.

    I then deactivated all my plugins and still the same problem.

    I then activated the default wordpress theme and the error went away.

    The theme I have installed is call Platform Pro by Pagelines that uses a child theme to make changes to the theme. It makes it a cinch to upgrade the theme without over writing your changes.

    So this is defiantly theme related. How do I get this to work seeings how I am using a child theme in WordPress?

    May 17, 2011 at 1:15 am #32505
    amin007
    Participant

    I don’t have a solution for this theme… we can only fix things if the issue is in our plugin’s code. You will have to contact your theme developer for that.

    May 17, 2011 at 10:51 pm #32506
    scotman
    Member

    Thanks amin007 I contacted Pagelines about this.

    You know I was thinking, I know it is not a good idea to silence warnings! But in this case the php code to purchase the product works and sends the visitor to paypal to purchase. I know you wouldn’t probably recommend it but do you think I will be just fine with silencing this and moving on. Will the rest of the wp e-store plugin features work like notifying wordpress their was a purchase and sending them the download link? Or will I have to test it and see?

    May 18, 2011 at 12:13 am #32507
    amin007
    Participant

    Yeah you can silence warning as long as the buttons are working on this page. What happens after the payment cannot be affected by this page so it is safe.

    May 18, 2011 at 6:31 am #32508
    scotman
    Member

    Thanks amin007 really appreciate all your help..this topic is resolved!

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ