Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
    <img src="https://docs.shopify.com/assets/images/api/tutorials/multipass-login-2.jpg" />
  </div>
  -->

  <div class="wrapper">
    <h3> Options </h3>
    <form name="" action="<?php 
echo esc_url(KeyshotShopifyMultipassAdmin::get_page_url());
?>
" method="post"> 
      <p>
        <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>