Created
December 31, 2020 10:04
-
-
Save MarkKevin08/6a08cd6267d81f1d2990a91fc4543ff9 to your computer and use it in GitHub Desktop.
Flat rate - QTY auto checked
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
add_filter( 'wcv_product_shipping_fee_national_qty', 'change_default_product_shipping_fee_national_qty' ); | |
function change_default_product_shipping_fee_national_qty() { | |
$field['id'] = '_shipping_fee_national_qty'; | |
$field['label'] = __( 'Charge once per product for national shipping, even if more than one is purchased.', 'wcvendors-pro' ); | |
$field['type'] = 'checkbox'; | |
$field['value'] = 'yes'; | |
$field['class'] = 'wcv-disable-national-input'; // This checks the checkbox | |
return $field; | |
} | |
add_filter( 'wcv_product_shipping_fee_international_qty', 'change_default_product_shipping_fee_international_qty' ); | |
function change_default_product_shipping_fee_international_qty() { | |
$field['id'] = '_shipping_fee_national_qty'; | |
$field['label'] = __( 'Charge once per product for national shipping, even if more than one is purchased.', 'wcvendors-pro' ); | |
$field['type'] = 'checkbox'; | |
$field['value'] = 'yes'; | |
$field['class'] = 'wcv-disable-national-input'; // This checks the checkbox | |
return $field; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment