WCPBC_Shipping_Free_Shipping

PBC Free Shipping Method.

Defined (1)

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

/includes/class-wcpbc-shipping-free-shipping.php  
  1. class WCPBC_Shipping_Free_Shipping extends WC_Shipping_Free_Shipping { 
  2.  
  3. /** 
  4. * get_option function. 
  5. * Gets and option from the settings API, using defaults if necessary to prevent undefined notices. 
  6. * @param string $key 
  7. * @param mixed $empty_value 
  8. * @return mixed The value specified for the option or a default value for the option. 
  9. */ 
  10. public function get_option( $key, $empty_value = null ) { 
  11.  
  12. $value = parent::get_option( $key, $empty_value ); 
  13. if ( $key === 'min_amount' && $value > 0 && WCPBC()->customer->exchange_rate && WCPBC()->customer->exchange_rate != '1' ) { 
  14. $value = $value * WCPBC()->customer->exchange_rate; 
  15.  
  16. return $value;