private static function shopify_multipass_url($user_login, $user)
 {
     $customer_data = array('email' => $user->user_email, 'tag_string' => 'blog_member', 'return_to' => get_site_url());
     $multipass = new ShopifyMultipass(KeyshotShopifyMultipass::get_api_secret());
     $token = $multipass->generate_token($customer_data);
     return 'https://' . KeyshotShopifyMultipass::get_api_domain() . '/account/login/multipass/' . $token;
 }
Example #2
0
        <label for="shopify_api_secret">
          Shopify Multipass api secret
          <br />
          <input name="shopify_api_secret" type="text" size="50" value="<?php 
echo esc_attr(KeyshotShopifyMultipass::get_api_secret());
?>
" class="regular-text" />
        </label>
      </p>

      <p>
        <label for="shopify_api_domain">
          Shopify store domain
          <br />
          <input name="shopify_api_domain" type="text" size="50" value="<?php 
echo esc_attr(KeyshotShopifyMultipass::get_api_domain());
?>
" class="regular-text" />
        </label>
      </p>

      <div>
        <label for="recaptcha_client_key">
          Recaptcha client side validation pass
          <br />
        </label>
        
        <input name="recaptcha_client_key" type="text" size="50" value="<?php 
echo KeyshotShopifyMultipass::get_recaptcha_client_key();
?>
" class="regular-text" />