Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Class nameclass WC_Legacy_Cart{
  2. public function testfunction()
  3. {
  4. echo $variable_to_pass;
  5.  
  6. $value_prova = apply_filters('get_value_from_function', $variable_to_pass);
  7. return $variable_to_pass;
  8. }
  9. }
  10.  
  11. add_filter( 'woocommerce_calculated_total', 'change_calculated_total', 10, 2 );
  12.  
  13. function change_calculated_total( $total, $cart, $variable_to_pass ) {
  14. return $total + $variable_to_pass;
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement