Skip to content

Commit

Permalink
fix: fetch hostname without requests (#34)
Browse files Browse the repository at this point in the history
Co-authored-by: Rohan <[email protected]>
  • Loading branch information
Alchez and Rohan authored Mar 14, 2022
1 parent 141592b commit 4a3edd3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shopify_integration/webhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import frappe
from frappe import _
from frappe.utils import get_url

SHOPIFY_WEBHOOK_TOPIC_MAPPER = {
"orders/create": "shopify_integration.orders.create_shopify_documents",
Expand Down Expand Up @@ -102,4 +103,4 @@ def get_shop_for_webhook():

def get_webhook_url():
# Shopify only supports HTTPS requests
return f"https://{frappe.request.host}/api/method/shopify_integration.webhooks.store_request_data"
return f"{get_url()}/api/method/shopify_integration.webhooks.store_request_data"

0 comments on commit 4a3edd3

Please sign in to comment.