woocommerce_simplify_commerce_hosted_args

Hosted payment args.

Description

(array) apply_filters( 'woocommerce_simplify_commerce_hosted_args', (callback) $array, (unknown) $order_get_id ); 

Returns (array)

Parameters (2)

0. $array — Optional. (callback) => array( 'sc-key' => $this->public_key, 'amount' => $order->get_total() * 100, 'reference' => $order->get_id(), 'name' => esc_html( get_bloginfo( 'name', 'display' ) ), 'description' => sprintf( __( 'Order #%s', 'woocommerce' ), $order->get_order_number() ), 'receipt' => 'false', 'color' => $this->modal_color, 'redirect-url' => WC()->api_request_url( 'WC_Gateway_Simplify_Commerce' ), 'address' => $order->get_billing_address_1() . ' ' . $order->get_billing_address_2(), 'address-city' => $order->get_billing_city(), 'address-state' => $order->get_billing_state(), 'address-zip' => $order->get_billing_postcode(), 'address-country' => $order->get_billing_country(), 'operation' => 'create.token', )
The array.
1. $order_get_id (unknown)
The order get id.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'woocommerce_simplify_commerce_hosted_args', $array, $order_get_id ); 
  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 woocommerce_simplify_commerce_hosted_args callback 
  2. function filter_woocommerce_simplify_commerce_hosted_args( $array, $order_get_id ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_simplify_commerce_hosted_args', 'filter_woocommerce_simplify_commerce_hosted_args', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_simplify_commerce_hosted_args', 'filter_woocommerce_simplify_commerce_hosted_args', 10, 2 ); 

Defined (1)

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

/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php  
  1. $args = apply_filters( 'woocommerce_simplify_commerce_hosted_args', array(