WC_Correios_Shipping_SEDEX_Hoje

SEDEX Hoje shipping method class.

Defined (1)

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

/includes/shipping/class-wc-correios-shipping-sedex-hoje.php  
  1. class WC_Correios_Shipping_SEDEX_Hoje extends WC_Correios_Shipping { 
  2.  
  3. /** 
  4. * Service code. 
  5. * 40290 - SEDEX Hoje without contract. 
  6. * @var string 
  7. */ 
  8. protected $code = '40290'; 
  9.  
  10. /** 
  11. * Initialize SEDEX Hoje. 
  12. * @param int $instance_id Shipping zone instance. 
  13. */ 
  14. public function __construct( $instance_id = 0 ) { 
  15. $this->id = 'correios-sedex-hoje'; 
  16. $this->method_title = __( 'SEDEX Hoje', 'woocommerce-correios' ); 
  17. $this->more_link = 'http://www.correios.com.br/para-voce/correios-de-a-a-z/sedex-hoje'; 
  18.  
  19. parent::__construct( $instance_id ); 
  20.  
  21. /** 
  22. * Get the declared value from the package. 
  23. * @param array $package Cart package. 
  24. * @return float 
  25. */ 
  26. protected function get_declared_value( $package ) { 
  27. if ( 16 >= $package['contents_cost'] ) { 
  28. return 0; 
  29.  
  30. return $package['contents_cost'];