Support » Plugin: The Events Calendar » Trying to disable TEC wp_insert_post action on certain page. Help?

  • Resolved brackishwaters


    I am developing a site that allows users to add and edit posts from the frontend. We also use TEC on this site. On the page where the user can add the post we get an error coming from the-events-calendar.class.php

    The problem is, on our post adding page, our code uses:

    do_action('wp_insert_post', 'wp_insert_post');

    However, because TEC is installed, we also see on line 230 of the above file mentioned:

    add_action( 'wp_insert_post', array( $this, 'addPostOrigin' ), 10, 2 );

    This causes an issue where the site displays an error on the post adding page:

    Warning: Missing argument 2 for TribeEvents::addPostOrigin() in F:\xampp\htdocs\sitename\wp-content\plugins\the-events-calendar\lib\the-events-calendar.class.php on line 1813

    What I would like to find out, is there a way to use remove_action to disable this function on this page only?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I ended up just hiding these errors though I would rather have found a remove solution instead. Here is the code I added to wp-config to handle this error output:

    @ini_set('error_reporting', 4339 ); //only log errors you will want to know about
    define('WP_DEBUG', false);
    define('WP_DEBUG_LOG', false);
    define('WP_DEBUG_DISPLAY', false);
    Plugin Author Rob La Gatta


    Awesome to hear you got this sorted, brackishwaters. Thanks for confirming as much and for posting the approach you took. The good news is that the 3.0 release we’re working on now, and should have out soon, likely fixes this. (If you wanted to have access to the beta, to test it out and see if you find this issue persists, let me know…happy to hook you up).

    Let me know what you’re thinking. Thanks for your support and patience so far.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trying to disable TEC wp_insert_post action on certain page. Help?’ is closed to new replies.