Title: <abbr title="Not Safe For Work / Mature content">[NSFW]</abbr> Function amp_is_available was called incorrectly
Last modified: November 9, 2022

---

# [NSFW] Function amp_is_available was called incorrectly

 *  Resolved [reeteshch31](https://wordpress.org/support/users/reeteshch31/)
 * (@reeteshch31)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/function-amp_is_available-was-called-incorrectly/)
 * i am not a technical
    and some pages showing this error please help me.
 * `Notice: Function amp_is_available was called incorrectly.`amp_is_available()`(
   or`amp_is_request()`, formerly`is_amp_endpoint()`) was called too early and so
   it will not work properly. WordPress is currently doing the`wp_print_scripts`
   hook. Calling this function before the`wp`action means it will not have access
   to`WP_Query`and the queried object to determine if it is an AMP response, thus
   neither the`amp_skip_post()`filter nor the AMP enabled toggle will be considered.
   It appears the plugin with slug`jetpack`is responsible; please contact the author.
   कृपया अधिक जानकारी हेतु वर्डप्रेस में डिबगिंग देखें। (इस संदेश 2.0.0 संस्करण 
   में जोड़ा गया.) in /home/u259700484/domains/domain.in/public_html/wp-includes/
   functions.php on line 5835`

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/function-amp_is_available-was-called-incorrectly/#post-16181328)
 * Hello [@reeteshch31](https://wordpress.org/support/users/reeteshch31/)
 * It seems you are using a plugin or theme or custom code that might be using [amp_is_available](https://amp-wp.org/reference/function/amp_is_available/)
   incorrectly.
 * As the deprecation message states that you need to use it after `wp` action. 
   [read](https://developer.wordpress.org/reference/hooks/wp/)
 * We will recommend checking your plugins or themes that are responsible for it
   and contacting it’s author to make changes so that amp_is_avilable is called 
   post wp action
 * eg:
 *     ```
       add_action( 'wp', function() {
            if ( amp_is_available() ) {
                 // do something if the AMP version of the page exists.
            }
       } );
       ```
   
 * Hope this helps!
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/function-amp_is_available-was-called-incorrectly/#post-16211788)
 * [@reeteshch31](https://wordpress.org/support/users/reeteshch31/) As we didn’t
   receive a response I’ll mark this as resolved. Feel free to open a [new support topic](https://wordpress.org/support/plugin/amp/#new-post)
   if you require any further assistance.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[NSFW] Function amp_is_available was called incorrectly’ is closed to
new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Milind More](https://wordpress.org/support/users/milindmore22/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/function-amp_is_available-was-called-incorrectly/#post-16211788)
 * Status: resolved