This method determines if the given version is older than the configured apiVersion
for the shopifyApi
object.
Its main use is when you want to tweak behaviour depending on your current API version, though apps won't typically need this kind of check.
const shopify = shopifyApi({
apiVersion: ApiVersion.July23,
});
if (shopify.utils.versionPriorTo(ApiVersion.July23)) {
// false in this example, as both versions are July23
}
if (shopify.utils.versionPriorTo(ApiVersion.October23)) {
// true in this example, as ApiVersion.October23 is newer than ApiVersion.July23, i.e. the configured version is older
// than the reference one
}
ApiVersion
| ❗ required
The API version to check against.
boolean
Whether the reference version is older than the configured version.