• Resolved gabrielhargitai

    (@gabrielhargitai)


    Hi,

    We’ve purchased the pro plugin and it is awesome!
    We have a special use case where we import Products via API calls and the Search results are not updated this way.

    Could we please have a way to issue a manual re-index, preferebly using a curl/wget call? As a workaround, we have aws_reindex_table set to hourly with wp_schedule_event, but we’d like to call it after the API has done its’ workings (once a day)

    Cheers,
    Gabor

Viewing 1 replies (of 1 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hello,

    Plugin itself for now doesn’t have any API methods but you can build some simple api for this using standard WordPress methods rest_api_init.
    Code can look like that

    add_action( 'rest_api_init', 'my_register_routes' );
    
    function my_register_routes() {
                register_rest_route( 'v1/awsreindex', array(
                    'methods'  => 'GET',
                    'callback' => 'aws_api_reindex',
                ));
    }
    
    function aws_api_reindex() {
        do_action('aws_reindex_table');
    }

    So now when you create GET request to yoursite.com/v1/awsreindex re-index will be started.

Viewing 1 replies (of 1 total)
  • The topic ‘Manual Re-index via curl/wget’ is closed to new replies.