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);