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
function find_free( $rates, $package ) { | |
// Make sure rate is available | |
if ( isset( $rates['usps:D_FIRST_CLASS'] ) ) { | |
// Go ahead and change the label to display something as $0.00 dollars does not populate. It just says USPS by default. | |
$rates['usps:D_FIRST_CLASS']->label = "USPS - FREE SHIPPING"; | |
// Set the cost to 0. | |
$rates ['usps:D_FIRST_CLASS']->cost = 0; |