• There are hooks from GamiPress to create your own event.
    
    function refferal_sistem_activity_triggers( $triggers ) {
        // The array key will be the group label
        $triggers['За привлеченного реферала'] = array(
            'refferal_sistem_event' => __( 'Реферальная система', 'gamipress' ),
        );
        return $triggers;
    }
    add_filter( 'gamipress_activity_triggers', 'refferal_sistem_activity_triggers' );
    
    function refferal_sistem_listener( $args ) {
      
        gamipress_trigger_event( array(
            
            'event' => 'refferal_sistem_event',
            'user_id' => get_current_user_id() 
        ) );
    }
    add_action( 'action_we_want_to_hook', 'refferal_sistem_listener' );
    
    I tried like this:
    add_action( 'wp_referral_code_after_refer_submitted', function ($new_user_id, $referrer_user_id, $ref_code, $new_user_ref_code){
    
    add_action( 'action_we_want_to_hook', 'referal_sistem_listener' );
    },10, 4 );
  • The topic ‘Help make WP Referral Code friends with GamiPress’ is closed to new replies.