Memberpress get member from email [closed]












0















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:




  1. Fetch member from MemberPress based on email

  2. 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.










share|improve this 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.























    0















    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:




    1. Fetch member from MemberPress based on email

    2. 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.










    share|improve this 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.





















      0












      0








      0








      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:




      1. Fetch member from MemberPress based on email

      2. 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.










      share|improve this question
















      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:




      1. Fetch member from MemberPress based on email

      2. 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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      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.


























          1 Answer
          1






          active

          oldest

          votes


















          1














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





          share|improve this answer






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














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





            share|improve this answer




























              1














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





              share|improve this answer


























                1












                1








                1







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





                share|improve this answer













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






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 21 '18 at 10:26









                Maxime CuleaMaxime Culea

                694




                694















                    Popular posts from this blog

                    MongoDB - Not Authorized To Execute Command

                    How to fix TextFormField cause rebuild widget in Flutter

                    in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith