Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created new abstract method for international shipping
- Loading branch information
1 parent
e633ada
commit 6cdae0e
Showing
7 changed files
with
66 additions
and
7 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
includes/abstracts/abstract-wc-correios-international-shipping.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
/** | ||
* Abstract Correios international shipping method. | ||
* | ||
* @package WooCommerce_Correios/Abstracts | ||
* @since 3.0.0 | ||
* @version 3.0.0 | ||
*/ | ||
|
||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit; | ||
} | ||
|
||
/** | ||
* Default Correios international shipping method abstract class. | ||
* | ||
* This is a abstract method with default options for all methods. | ||
*/ | ||
abstract class WC_Correios_International_Shipping extends WC_Correios_Shipping { | ||
|
||
/** | ||
* Get shipping method title. | ||
* | ||
* @return string | ||
*/ | ||
public function get_method_title() { | ||
return sprintf( __( '%s is a international shipping method from Correios, the brazilian most used delivery company.', 'woocommerce-correios' ), $this->method_title ); | ||
} | ||
|
||
/** | ||
* Get shipping rate. | ||
* | ||
* @param array $package Order package. | ||
* | ||
* @return SimpleXMLElement | ||
*/ | ||
protected function get_rate( $package ) { | ||
|
||
} | ||
|
||
/** | ||
* Calculates the shipping rate. | ||
* | ||
* @param array $package Order package. | ||
*/ | ||
public function calculate_shipping( $package = array() ) { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters