Created
January 12, 2018 18:08
-
-
Save ChrisFlannagan/bcfe4ea1cbfdcd629db7f292c22cc40c to your computer and use it in GitHub Desktop.
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
<?php | |
add_filter( 'woocommerce_settings_api_form_fields_cod', function( $form_fields ) { | |
$form_fields[ 'custom_fee' ] = [ | |
'title' => __( 'Fee in $', 'textdomain' ), | |
'type' => 'number', | |
'description' => __( 'Add a fee to orders using Cash on Delivery gateway.', 'textdomain' ), | |
'default' => 0, | |
'min' => 0, | |
'step' => .01, | |
'desc_tip' => true, | |
]; | |
return $form_fields; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment