edd_amazon_charge_args

The Easy Digital Downloads edd amazon charge args hook.

Description

apply_filters( 'edd_amazon_charge_args', (callback) $array, (unknown) $purchase_data ); 

Parameters (2)

0. $array — Optional. (callback) => array( 'merchant_id' => edd_get_option( 'amazon_seller_id', '' ), 'amazon_reference_id' => $purchase_data['post_data']['edd_amazon_reference_id'], 'authorization_reference_id' => $purchase_data['purchase_key'], 'charge_amount' => $purchase_data['price'], 'currency_code' => edd_get_currency(), 'charge_note' => html_entity_decode( edd_get_purchase_summary( $purchase_data, false ) ), 'charge_order_id' => $purchase_data['purchase_key'], 'store_name' => remove_accents( wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) ), 'transaction_timeout' => 0 )
The array.
1. $purchase_data (unknown)
The purchase data.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'edd_amazon_charge_args', $array, $purchase_data ); 
  2.  
  3. if ( !empty( $array ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the edd_amazon_charge_args callback 
  2. function filter_edd_amazon_charge_args( $array, $purchase_data ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'edd_amazon_charge_args', 'filter_edd_amazon_charge_args', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'edd_amazon_charge_args', 'filter_edd_amazon_charge_args', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/gateways/amazon-payments.php  
  1. $args = apply_filters( 'edd_amazon_charge_args', array(