Last active
March 31, 2016 11:59
-
-
Save WooForce/b36200453b063513d2ad to your computer and use it in GitHub Desktop.
Exclude undesired First Class Mail services on WooForce USPS Plugin
This file contains hidden or 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
// Exclude the services First-Class Mail Postcards, First-Class Mail Large Envelope and First-Class Mail Stamped Letter | |
add_filter('usps_disable_first_class_rate_first-class-mail-postcards', 'disable_first_class_rate_for_this_service',10,3); | |
add_filter('usps_disable_first_class_rate_first-class-mail-large-envelope', 'disable_first_class_rate_for_this_service',10,3); | |
add_filter('usps_disable_first_class_rate_first-class-mail-stamped-letter', 'disable_first_class_rate_for_this_service',10,3); | |
function disable_first_class_rate_for_this_service() { | |
return true; | |
} | |
// Include First-Class Mail Parcel ( Default Behaviour) | |
add_filter('usps_disable_first_class_rate_first-class-mail-parcel', 'disable_first_class_rate_for_parcel_service',10,3); | |
function disable_first_class_rate_for_parcel_service() { | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment