Skip to content

Instantly share code, notes, and snippets.

@fervous
Created February 11, 2018 03:11
Show Gist options
  • Save fervous/f8366f38cb709494cf04ad99cdc08663 to your computer and use it in GitHub Desktop.
Save fervous/f8366f38cb709494cf04ad99cdc08663 to your computer and use it in GitHub Desktop.
wc vendors pro remove all international shipping and no national shipping checkbox
/*Remove International Shipping Charge Field */
add_filter( 'wcv_shipping_international_fee', 'hide_wcv_shipping_international_fee' );
function hide_wcv_shipping_international_fee( $field ) {
$field['label'] = __( '' );
$field['description'] = __( '' );
$field['type'] = 'hidden';
$field['value'] = 'no';
return $field;
}
/*remove Int'l quantity checkbox */
add_filter( 'wcv_shipping_international_qty', 'change_wcv_shipping_international_qty' );
function change_wcv_shipping_international_qty( $field ) {
$field['label'] = __( '' );
$field['type'] = 'hidden';
$field['value'] = 'no';
return $field;
}
/*remove Int'l disable checkbox */
add_filter( 'wcv_shipping_international_disable', 'change_wcv_shipping_international_disable' );
function change_wcv_shipping_international_disable( $field ) {
$field['label'] = __( '' );
$field['type'] = 'hidden';
$field['value'] = 'yes';
return $field;
}
/*remove Int'l free checkbox */
add_filter( 'wcv_shipping_international_free', 'change_wcv_shipping_international_free' );
function change_wcv_shipping_international_free( $field ) {
$field['label'] = __( '' );
$field['type'] = 'hidden';
$field['value'] = 'no';
return $field;
}
/*remove national disable checkbox */
add_filter( 'wcv_shipping_national_disable', 'change_wcv_shipping_national_disable' );
function change_wcv_shipping_national_disable( $field ) {
$field['label'] = __( '' );
$field['type'] = 'hidden';
$field['value'] = 'no';
$field['wrapper_start'] = __( '' );
$field['wrapper_end'] = __( '' );
return $field;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment