• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Easy Digital Downloads a2z

Easy Digital Downloads a2z

Easy Digital Downloads a2z

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / EDD_Tracking::send_checkin() – Send the data to the EDD server

You appear to be a bot. Output may be restricted

Description

Send the data to the EDD server

Usage

$bool = EDD_Tracking::send_checkin( $override, $ignore_last_checkin );

Parameters

$override
( bool ) optional – If we should override the tracking setting.
$ignore_last_checkin
( bool ) optional – If we should ignore when the last check in was.

Returns

bool

Source

File name: easy-digital-downloads/includes/admin/tracking.php
Lines:

1 to 35 of 35
  public function send_checkin( $override = false, $ignore_last_checkin = false ) {

    $home_url = trailingslashit( home_url() );
    // Allows us to stop our own site from checking in, and a filter for our additional sites
    if ( $home_url === 'https://easydigitaldownloads.com/' || apply_filters( 'edd_disable_tracking_checkin', false ) ) {
      return false;
    }

    if( ! $this->tracking_allowed() && ! $override ) {
      return false;
    }

    // Send a maximum of once per week
    $last_send = $this->get_last_send();
    if( is_numeric( $last_send ) && $last_send > strtotime( '-1 week' ) && ! $ignore_last_checkin ) {
      return false;
    }

    $this->setup_data();

    wp_remote_post( 'https://easydigitaldownloads.com/?edd_action=checkin', array(
      'method'      => 'POST',
      'timeout'     => 8,
      'redirection' => 5,
      'httpversion' => '1.1',
      'blocking'    => false,
      'body'        => $this->data,
      'user-agent'  => 'EDD/' . EDD_VERSION . '; ' . get_bloginfo( 'url' )
    ) );

    update_option( 'edd_tracking_last_send', time() );

    return true;

  }
 

 View on GitHub View on Trac

Published: 26th November 2019 | Last updated: 26th November 2019

Primary Sidebar

Information

Function name: EDD_Tracking::send_checkin
Class ref: EDD_Tracking
Plugin ref: Easy Digital Downloads
Version: 2.11.6
Sourcefile: includes/admin/tracking.php
File ref: includes/admin/tracking.php
Deprecated?: No
API Letters: C,E,S,T

Footer

Easy Digital Downloads a2z
Easy Digital Downloads a2z
Easy Digital Downloads a2z
WordPress 5.9.3
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  edd.wp-a2z.org
© Copyright Easy Digital Downloads a2z 2014-2022. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites