• 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_Register_Meta::register_payment_meta() – Register the meta for the edd_payment post type.

Warning: Only the first byte will be assigned to the string offset in /home/customer/www/bobbingwide.org.uk/public_html/wp-content/plugins/oik-shortcodes/shortcodes/oik-api-importer.php on line 1864

You appear to be a bot. Output may be restricted

Description

Register the meta for the edd_payment post type.

Usage

$void = EDD_Register_Meta::register_payment_meta();

Parameters

Returns

void

Source

File name: easy-digital-downloads/includes/class-edd-register-meta.php
Lines:

1 to 100 of 162
  public function register_payment_meta() {

    register_meta(
      'post',
      '_edd_payment_user_email',
      array(
        'object_subtype'    => 'edd_payment',
        'sanitize_callback' => 'sanitize_email',
        'type'              => 'string',
        'description'       => __( 'The email address associated with the purchase.', 'easy-digital-downloads' ),
      )
    );

    // Pre-WordPress 4.6 compatibility
    if ( ! has_filter( 'sanitize_post_meta__edd_payment_user_email' ) ) {
      add_filter( 'sanitize_post_meta__edd_payment_user_email', 'sanitize_email',  < 10, 4 );
    }

    register_meta(
      'post',
      '_edd_payment_customer_id',
      array(
        'object_subtype'    => 'edd_payment',
        'sanitize_callback' => array( $this, 'intval_wrapper' ),
        'type'              => 'int',
        'description'       => __( 'The Customer ID associated with the payment.', 'easy-digital-downloads' ),
      )
    );

    if ( ! has_filter( 'sanitize_post_meta__edd_payment_customer_id' ) ) {
      add_filter( 'sanitize_post_meta__edd_payment_customer_id', array( $this, 'intval_wrapper' ), 10, 4 );
    }

    register_meta(
      'post',
      '_edd_payment_user_id',
      array(
        'object_subtype'    => 'edd_payment',
        'sanitize_callback' => array( $this, 'intval_wrapper' ),
        'type'              => 'int',
        'description'       => __( 'The User ID associated with the payment.', 'easy-digital-downloads' ),
      )
    );

    if ( ! has_filter( 'sanitize_post_meta__edd_payment_user_id' ) ) {
      add_filter( 'sanitize_post_meta__edd_payment_user_id', array( $this, 'intval_wrapper' ), 10, 4 );
    }

    register_meta(
      'post',
      '_edd_payment_user_ip',
      array(
        'sanitize_callback' => 'sanitize_text_field',
        'type'              => 'string',
        'description'       => __( 'The IP address the payment was made from.', 'easy-digital-downloads' ),
      )
    );

    if ( ! has_filter( 'sanitize_post_meta__edd_payment_user_ip' ) ) {
      add_filter( 'sanitize_post_meta__edd_payment_user_ip', 'sanitize_text_field',  < 10, 4 );
    }

    register_meta(
      'post',
      '_edd_payment_purchase_key',
      array(
        'sanitize_callback' => 'sanitize_text_field',
        'type'              => 'string',
        'description'       => __( 'The unique purchase key for this payment.', 'easy-digital-downloads' ),
      )
    );

    if ( ! has_filter( 'sanitize_post_meta__edd_payment_purchase_key' ) ) {
      add_filter( 'sanitize_post_meta__edd_payment_purchase_key', 'sanitize_text_field',  < 10, 4 );
    }

    register_meta(
      'post',
      '_edd_payment_total',
      array(
        'sanitize_callback' => 'edd_sanitize_amount',
        'type'              => 'float',
        'description'       => __( 'The purchase total for this payment.', 'easy-digital-downloads' ),
      )
    );

    if ( ! has_filter( 'sanitize_post_meta__edd_payment_total' ) ) {
      add_filter( 'sanitize_post_meta__edd_payment_total', 'edd_sanitize_amount', 10, 4 );
    }

    register_meta(
      'post',
      '_edd_payment_mode',
      array(
        'sanitize_callback' => 'sanitize_text_field',
        'type'              => 'string',
        'description'       => __( 'Identifies if the purchase was made in Test or Live mode.', 'easy-digital-downloads' ),
      )
    );

 
[1] [2] Next »

 View on GitHub View on Trac

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

Primary Sidebar

Information

Function name: EDD_Register_Meta::register_payment_meta
Class ref: EDD_Register_Meta
Plugin ref: Easy Digital Downloads
Version: 2.11.6
Sourcefile: includes/class-edd-register-meta.php
File ref: includes/class-edd-register-meta.php
Deprecated?: No
API Letters: E,M,P,R

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