woocommerce_gzd_template_checkout_forwarding_fee_notice

The WooCommerce Germanized woocommerce gzd template checkout forwarding fee notice function.

Description

woocommerce_gzd_template_checkout_forwarding_fee_notice(); 

Usage

  1. if ( !function_exists( 'woocommerce_gzd_template_checkout_forwarding_fee_notice' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-germanized/includes/wc-gzd-template-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = woocommerce_gzd_template_checkout_forwarding_fee_notice(); 
  7.  

Defined (1)

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

/includes/wc-gzd-template-functions.php  
  1. function woocommerce_gzd_template_checkout_forwarding_fee_notice() { 
  2.  
  3. $gateways = WC()->payment_gateways()->get_available_payment_gateways(); 
  4.  
  5. if ( ! ( $key = WC()->session->get('chosen_payment_method') ) || ! isset( $gateways[ $key ] ) ) 
  6. return; 
  7.  
  8. $gateway = $gateways[ $key ]; 
  9.  
  10. if ( $gateway->get_option( 'forwarding_fee' ) ) 
  11. echo apply_filters( 'woocommerce_gzd_forwarding_fee_checkout_text', '<tr><td colspan="2">' . sprintf( __( 'Plus %s forwarding fee (charged by the transport agent)', 'woocommerce-germanized' ), wc_price( $gateway->get_option( 'forwarding_fee' ) ) ) . '</td></tr>' ); 
  12.