This commit is contained in:
2025-05-03 17:51:24 +10:00
parent 6427c2e2a5
commit fe463093bc
+2 -2
View File
@@ -517,7 +517,7 @@ def post_to_wp(
""" """
try: try:
# Get WordPress credentials from environment # Get WordPress credentials from environment
wp_url = "https://insiderfoodie.com" wp_url = "https://insiderfoodie.com/xmlrpc.php" # Updated XML-RPC endpoint
wp_username = author["username"] wp_username = author["username"]
wp_password = os.getenv(f"{wp_username.upper()}_PASSWORD") wp_password = os.getenv(f"{wp_username.upper()}_PASSWORD")
@@ -577,7 +577,7 @@ def post_to_wp(
if result and 'id' in result: if result and 'id' in result:
post_id = result['id'] post_id = result['id']
post_url = f"{wp_url}/?p={post_id}" post_url = f"https://insiderfoodie.com/?p={post_id}"
logger.info(f"Successfully posted to WordPress (ID: {post_id})") logger.info(f"Successfully posted to WordPress (ID: {post_id})")
return post_id, post_url return post_id, post_url