-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separate the logic for custom surcharge
- Loading branch information
Showing
2 changed files
with
46 additions
and
8 deletions.
There are no files selected for viewing
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,33 @@ | ||
<?php | ||
/** | ||
* A class for working around the quirks and different versions of WordPress/WooCommerce | ||
* This is for versions higher than 2.6 (3.0 and higher) | ||
*/ | ||
|
||
// No direct access please. | ||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit; | ||
} | ||
|
||
if ( ! class_exists( 'WC_Connect_Custom_Surcharge' ) ) { | ||
/** | ||
* WC_Connect_Compatibility class. | ||
*/ | ||
class WC_Connect_Custom_Surcharge { | ||
|
||
/** | ||
* Get US Colorado custom surcharge eligibility. | ||
* | ||
* @param WC_Cart|null $cart Cart object or null. | ||
* | ||
* @return boolean. | ||
*/ | ||
public static function get_us_co_eligibility( $cart = null ) { | ||
if ( $cart instanceof WC_Cart ) { | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
} | ||
} |
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