Using AJAX in FrontEnd with WordPress Plugin Boilerplate (wppb.io)

There is no action variable on the data you’re passing to Ajax. This way WordPress is sending just a generic call to Ajax which always return 0. You must edit your data on your JS file to something like:

    data: {
        'user_input': user_input_last,
        'action': 'tags_autofill_function'
    },

Leave a Comment