wpsc_purchase_log_notification_common_args

Located in: purchase-log-notification.class.php

Functions that call this hook: get_common_args()

Arguments Accepted: $args, $this

Version Introduced: 3.8.9

Description: Filter the array containing default placeholders and values for purchase notifications (purchase receipts, admin sales report).

Code in context:

[php firstline=”36″ highlight=”62″]

$args = array(

// Legacy tags

// These tags are dumb because they force the string to go with the amount, giving no

// control to the user. Unfortunately we still have to support those for the next decade.

‘purchase_id’ => sprintf( __( "Purchase # %s" , ‘wpsc’ ), $this->purchase_log->get( ‘id’ ) ) . "rn",

‘total_tax’ => sprintf( __( ‘Total Tax: %s’ , ‘wpsc’ ), $tax ) . "rn",

‘total_shipping’ => sprintf( __( ‘Total Shipping: %s’, ‘wpsc’ ), $shipping ) . "rn",

‘total_price’ => sprintf( __( ‘Total: %s’ , ‘wpsc’ ), $total ) . "rn",

‘shop_name’ => get_option( ‘blogname’ ),

‘find_us’ => $this->purchase_log->get( ‘find_us’ ),

‘discount’ => sprintf( __( ‘Discount Amount: %s (%s)’, ‘wpsc’ ), $discount, $this->purchase_log->get( ‘discount_data’ ) ) . "rn",

// New tags

‘coupon_code’ => $this->purchase_log->get( ‘discount_data’ ),

‘transaction_id’ => $this->purchase_log->get( ‘transactid’ ),

‘purchase_log_id’ => $this->purchase_log->get( ‘id’ ),

‘payment_method’ => $this->purchase_log->get( ‘gateway_name’ ),

‘shipping_method’ => $this->purchase_log->get( ‘shipping_method_name’ ),

‘shipping_option’ => $this->purchase_log->get( ‘shipping_option_name’ ),

‘discount_amount’ => $discount,

‘tax’ => $tax,

‘shipping’ => $shipping,

‘total’ => $total,

‘subtotal’ => $subtotal,

);

return apply_filters( ‘wpsc_purchase_log_notification_common_args’, $args, $this );

[/php]