What do you want to save?
Add Code snippet
New code examples
-
Other 2022-01-30 12:06:48
woocommerce hook after order success
add_action('woocommerce_thankyou', 'enroll_student', 10, 1); function enroll_student( $order_id ) { if ( ! $order_id ) return; // Allow code execution only once if( ! get_post_meta( $order_id, '_thankyou_action_done', true ) ) { ... Add solution
Best helpers
Seria Yin
+5
Kyle Smith
+5
JSanchez
+5
Larapsodia
+5
TJG
+5
Sharma Pocso
+5
Wilber82
+5
T-rex
+5
Wayno
+5
Winny
+5
Sikku
+5
AlecPerkey
+5
The Alpha
+5
IQAndreas
+5
TeacherSue
+5