Hooks استعمال جي رهنمائي
Ultimate Multisite 200+ action hooks ۽ 280+ filter hooks مهيا ڪري ٿو. هي صفحو عملي مثالن سان سڀ کان وڌيڪ استعمال ٿيندڙ hooks کي بيان ڪري ٿو. مڪمل خودڪار طور تي ٺهيل حوالي لاءِ، هن حصي جا ٻيا صفحا ڏسو.
Action Hooks
گراهڪ جي حياتي چڪر
گراهڪ ٺهڻ کان پوءِ
/**
* @param WP_Ultimo\Models\Customer $customer
*/
add_action('wu_customer_post_create', function($customer) {
wp_mail(
$customer->get_email(),
'Welcome!',
'Thanks for joining our platform!'
);
});
گراهڪ جي حالت ۾ تبديلي
/**
* @param WP_Ultimo\Models\Customer $customer
* @param string $old_status
* @param string $new_status
*/
add_action('wu_customer_status_change', function($customer, $old_status, $new_status) {
// React to status transitions
}, 10, 3);