WC_Correios_Shipping_SEDEX_12

SEDEX 12 shipping method class.

Defined (1)

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

/includes/shipping/class-wc-correios-shipping-sedex12.php  
  1. class WC_Correios_Shipping_SEDEX_12 extends WC_Correios_Shipping { 
  2.  
  3. /** 
  4. * Service code. 
  5. * 40169 - SEDEX 12. 
  6. * @var string 
  7. */ 
  8. protected $code = '40169'; 
  9.  
  10. /** 
  11. * Initialize SEDEX 12. 
  12. * @param int $instance_id Shipping zone instance. 
  13. */ 
  14. public function __construct( $instance_id = 0 ) { 
  15. $this->id = 'correios-sedex12'; 
  16. $this->method_title = __( 'SEDEX 12', 'woocommerce-correios' ); 
  17. $this->more_link = 'http://www.correios.com.br/para-voce/correios-de-a-a-z/sedex-12'; 
  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'];