is_amp_endpoint() inside tracking_api_helper.php
-
public function insert_pixel( $impression_params ) { $body = json_decode( $impression_params, true ); $pixel_url = $body["pixel-url"]; if ( ! is_amp_endpoint() ) { echo '<img src="' . $pixel_url . '" style="display:none"></img>'; } }
I see you don’t perform a proper
function_exists('is_amp_endpoint')
before usingis_amp_endpoint()
so this code may trigger a Fatal Error if AMP plugin is not active.
- The topic ‘is_amp_endpoint() inside tracking_api_helper.php’ is closed to new replies.