• The search index doesn’t seem to update with product imports/updates via the WP All Import plugin (which pulls in a csv file and updates all products from our database).

    Can this be fixed and, if not, is there any way of triggering Reindex Table via wp-cron or similar (I could trigger it after the daily import is complete).

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hello,

    For now it is possible to trigger re-index of plugin.

    You just need to call ‘aws_reindex_table’ action.

    Its can be done with this code:

    do_action('aws_reindex_table');

    If you want to add this action as cron job you can do something like

    add_action( 'wp', 'aws_set_cron' );
    
    function aws_set_cron() {
        if ( ! wp_next_scheduled ( 'aws_reindex_table' ) ) {
            wp_schedule_event(time(), 'hourly', 'aws_reindex_table');
        }
    } 

    This code will run re-index cron job every hour.

    Thread Starter h-ford

    (@handford)

    Hi,

    Thanks – have done that. The cron job creates, but the index doesn’t seem to rebuild – there just seems to be a new cron job that gets created every 5 mins or so.

    Hook Name           Arguments	  Actions	
    aws_reindex_table   ["inner"]     AWS_Table->reindex_table_job()
    • This reply was modified 5 years, 10 months ago by h-ford.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Not working with WP All Import’ is closed to new replies.