• Hello,

    I am developing one plugin.In my plugin I want to send AJAX Request to get some data from tables. Also I want to execute wordpress function to be executed in AJAX Call like
    dirname(plugin_basename(__FILE__)),
    plugin_dir_path( __FILE__ ),
    plugins_url(”,__FILE__),site_url()

    when I run it, AJAX request gives me Fatal error</b>: Call to undefined function plugin_basename()

    Is there any way to execute these functions?
    please reply
    Thanks,

  • The topic ‘how to use wordpress function in ajax request?’ is closed to new replies.