Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save plugin-republic/e5876ef1a365440696e592b1069a9d8f to your computer and use it in GitHub Desktop.
Save plugin-republic/e5876ef1a365440696e592b1069a9d8f to your computer and use it in GitHub Desktop.
<?php
/**
* Create multiple variables for calculation fields
*/
function prefix_calculation_global_calculation_vars( $vars ) {
return array(
'my_first_variable' => 50,
'price_modifier_1' => 150
);
}
add_filter( 'pewc_calculation_global_calculation_vars', 'prefix_calculation_global_calculation_vars' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment