Forked from plugin-republic/pewc_calculation_global_calculation_vars.php
Created
July 20, 2021 16:39
-
-
Save tamara-m/bfb6fa5cb0c8d0303e52352510ba2b00 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 | |
/** | |
* 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