How to hook function to action
-
How can I hook the following code in the following hook (give_update_payment_status) via add_action
For now I am doing by editing the original code in the file plugins\give\includes\payments\class-give-payment.php”
but writing the following code.do_action( 'give_update_payment_status', $this->ID, $status, $old_status ); if($status=="publish"){ if($this->form_id==235){ $balance = get_field('balsance',235); $balance = $balance + $this->subtotal; update_field('balance', $balance, 235); }elseif ($this->form_id==62) { $balance = get_field('balance',235); if($balance>= $this->subtotal){ $balance = $balance - $this->subtotal; }else{ $balance = 0; } update_field('balance', $balance, 235); $state_data = get_field('state_data',$this->form_id); update_field('state_data',$this.'ss1' , $this->form_id); }else{ } }
So can you please assist me with this please ..
Also how can I access the custom form fields inside above code
I know this might not be in the scope of support but can you pleas please help me on this
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to hook function to action’ is closed to new replies.