• Craig

    (@spedadvocate)


    For my form “available items test” you generate the hook:
    add_filter('cf7_2_post_filter-available-items-test_categories','filter_available_items_test_categories',10,3);
    I have a category and its slug is “materials-available” and its id = 15
    I cannot get the hook working for some reason. What should I set $value to? I think I have tried everything …

Viewing 1 replies (of 1 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    Dear @spedadvocate, apologies for replying so late. Somehow I missed this post.

    What should I set $value to?

    is this a taxonomy mapping using a custom filter? If so it expects the term_id (15 in this case).

    There can be several things that are going wrong. Have you checked that your hook is firing properly?

    The plugin has a few debug logging calls if you enable the following in your wp-config.php file,

    define('WP_GURUS_DEBUG', true);
    
     define('WP_DEBUG', true);
     if ( WP_DEBUG ) {
         define( 'WP_DEBUG_LOG', true );
         define( 'WP_DEBUG_DISPLAY', false );
         @ini_set( 'display_errors', 0 );
         define('AUTOSAVE_INTERVAL', 600 );  //seconds
     }
    

    this will trigger debug log lines to the wp-content/debug.log file which may give you a clue as to what is going wrong.

Viewing 1 replies (of 1 total)
  • The topic ‘Set category by filter’ is closed to new replies.