get_title() Closes #1204

Like the gateways now have.
This commit is contained in:
Mike Jolley 2012-06-30 00:20:07 +01:00
parent 058c3ed9d4
commit d8a969610f
1 changed files with 21 additions and 2 deletions

View File

@ -151,7 +151,26 @@ class WC_Shipping_Method extends WC_Settings_API {
return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', true );
}
/**
* Return the gateways title
*
* @access public
* @return void
*/
function get_title() {
return apply_filters( 'woocommerce_shipping_method_title', $this->title, $this->id );
}
/**
* get_fee function.
*
* @access public
* @param mixed $fee
* @param mixed $total
* @return void
*/
function get_fee( $fee, $total ) {
if ( strstr( $fee, '%' ) ) :
$fee = ( $total / 100 ) * str_replace( '%', '', $fee );
@ -171,7 +190,7 @@ class WC_Shipping_Method extends WC_Settings_API {
*/
function supports( $feature ) {
return apply_filters( 'woocommerce_payment_gateway_supports', in_array( $feature, $this->supports ) ? true : false, $feature, $this );
return apply_filters( 'woocommerce_shipping_method_supports', in_array( $feature, $this->supports ) ? true : false, $feature, $this );
}
}