I was trying to modify the customer notifications to customise it based on if they paid via shopify_payments or via Manual Bank transfer.
My use-case is that if someone uses a manual payment method like “Bank Deposit”, they are requesting a quote (our theme wording reflects this), but if they have paid, it is an invoice.
The code seems to indicate that the “has_pending_payment” variable should fulfil this purpose, but apparently this is not the case.
“Upper Support” said :
It turned out that the {% if has_pending_payment %} Liquid condition cannot be triggered for order confirmation notifications if the customer used a manual payment gateway such as bank deposit. This is because manual payment gateways typically do not have an automated payment capture or confirmation process integrated with Shopify. The payment status remains pending until you manually mark the order as paid after receiving the payment outside of Shopify’s system. Therefore, the system does not automatically update the payment status to trigger {% if has_pending_payment %} in notifications.
Hence, the {% if has_pending_payment %} condition is designed to work with payment methods that have automated status updates, not manual payment gateways.
So, I did some testing, and was able to determine what values occur when shopify_payments are used vs manual methods. Obviously this may vary depending on what options you have turned on, but at least you can work out how to adjust your code.
Payment Status: {{ financial_status }}
Payment Method: {{ unique_gateways }}
For a Bank Deposit quote request, this is what shows:
Payment Status: pending
Payment Method: Bank Deposit
For a Card Payment:
Payment Status: paid
Payment Method: shopify_payments