Memberpress get member from email [closed]
I am creating a plugin in which user purchase a product from ClickFunnel and pay through Stripe, Now ClickFunnel does not provide API anymore so I am fetching data from Stripe, After receiving this data I want to do following things:
- Fetch member from MemberPress based on email
- Create transaction to update membership
MemberPress provide developer options to get member data, in order to get member I need member id, which i don't have, I only have data received from stripe API.
Data I have received from stripe is:
Payment ID: xxxx
Amount: 3700
Products: Test Product
Email: abc@example.com
Name: Mr. ABC
I want to fetch members based on email, how can I achieve this via code. client don't want to use third party services like Zapier.
php wordpress api
closed as too broad by Gábor Bakos, Owen Pauling, EdChum, DanielBarbarian, greg-449 Nov 21 '18 at 11:06
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I am creating a plugin in which user purchase a product from ClickFunnel and pay through Stripe, Now ClickFunnel does not provide API anymore so I am fetching data from Stripe, After receiving this data I want to do following things:
- Fetch member from MemberPress based on email
- Create transaction to update membership
MemberPress provide developer options to get member data, in order to get member I need member id, which i don't have, I only have data received from stripe API.
Data I have received from stripe is:
Payment ID: xxxx
Amount: 3700
Products: Test Product
Email: abc@example.com
Name: Mr. ABC
I want to fetch members based on email, how can I achieve this via code. client don't want to use third party services like Zapier.
php wordpress api
closed as too broad by Gábor Bakos, Owen Pauling, EdChum, DanielBarbarian, greg-449 Nov 21 '18 at 11:06
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I am creating a plugin in which user purchase a product from ClickFunnel and pay through Stripe, Now ClickFunnel does not provide API anymore so I am fetching data from Stripe, After receiving this data I want to do following things:
- Fetch member from MemberPress based on email
- Create transaction to update membership
MemberPress provide developer options to get member data, in order to get member I need member id, which i don't have, I only have data received from stripe API.
Data I have received from stripe is:
Payment ID: xxxx
Amount: 3700
Products: Test Product
Email: abc@example.com
Name: Mr. ABC
I want to fetch members based on email, how can I achieve this via code. client don't want to use third party services like Zapier.
php wordpress api
I am creating a plugin in which user purchase a product from ClickFunnel and pay through Stripe, Now ClickFunnel does not provide API anymore so I am fetching data from Stripe, After receiving this data I want to do following things:
- Fetch member from MemberPress based on email
- Create transaction to update membership
MemberPress provide developer options to get member data, in order to get member I need member id, which i don't have, I only have data received from stripe API.
Data I have received from stripe is:
Payment ID: xxxx
Amount: 3700
Products: Test Product
Email: abc@example.com
Name: Mr. ABC
I want to fetch members based on email, how can I achieve this via code. client don't want to use third party services like Zapier.
php wordpress api
php wordpress api
edited Nov 21 '18 at 9:05
Hemant Kumar
asked Nov 21 '18 at 7:37


Hemant KumarHemant Kumar
404317
404317
closed as too broad by Gábor Bakos, Owen Pauling, EdChum, DanielBarbarian, greg-449 Nov 21 '18 at 11:06
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as too broad by Gábor Bakos, Owen Pauling, EdChum, DanielBarbarian, greg-449 Nov 21 '18 at 11:06
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If you use this response into your php and want also to get the corresponding WP_User, I assume you could use the get_user_by()
method like so :
<?php $user = get_user_by( 'email', 'user@example.com' );
if ( ! empty( $user ) && ! is_wp_error( $user ) {
/**
* User exists
* @var $user WP_User
*/
printf( 'User is %s %s.', $user->first_name, $user->last_name );
}
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you use this response into your php and want also to get the corresponding WP_User, I assume you could use the get_user_by()
method like so :
<?php $user = get_user_by( 'email', 'user@example.com' );
if ( ! empty( $user ) && ! is_wp_error( $user ) {
/**
* User exists
* @var $user WP_User
*/
printf( 'User is %s %s.', $user->first_name, $user->last_name );
}
add a comment |
If you use this response into your php and want also to get the corresponding WP_User, I assume you could use the get_user_by()
method like so :
<?php $user = get_user_by( 'email', 'user@example.com' );
if ( ! empty( $user ) && ! is_wp_error( $user ) {
/**
* User exists
* @var $user WP_User
*/
printf( 'User is %s %s.', $user->first_name, $user->last_name );
}
add a comment |
If you use this response into your php and want also to get the corresponding WP_User, I assume you could use the get_user_by()
method like so :
<?php $user = get_user_by( 'email', 'user@example.com' );
if ( ! empty( $user ) && ! is_wp_error( $user ) {
/**
* User exists
* @var $user WP_User
*/
printf( 'User is %s %s.', $user->first_name, $user->last_name );
}
If you use this response into your php and want also to get the corresponding WP_User, I assume you could use the get_user_by()
method like so :
<?php $user = get_user_by( 'email', 'user@example.com' );
if ( ! empty( $user ) && ! is_wp_error( $user ) {
/**
* User exists
* @var $user WP_User
*/
printf( 'User is %s %s.', $user->first_name, $user->last_name );
}
answered Nov 21 '18 at 10:26


Maxime CuleaMaxime Culea
694
694
add a comment |
add a comment |