Skip to content

Instantly share code, notes, and snippets.

@digitalchild
Created June 17, 2017 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digitalchild/ee745bf7480e63d10b84b8eaf12d7ea7 to your computer and use it in GitHub Desktop.
Save digitalchild/ee745bf7480e63d10b84b8eaf12d7ea7 to your computer and use it in GitHub Desktop.
Filter regular price
<?php
add_filter( 'wcv_product_price', 'add_product_fee' );
function add_product_fee( $field ){
$value = get_post_meta( $field['post_id'], $field['id'], true );
$field[ 'value' ] = $value /* + fee here */ ;
return $field;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment