You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to get this bot working again, and I've come across something that I can't really figure out. I was wondering if I could get some insight from one of the bot's contributors as to what exactly these lines of code do, specifically the const shipping_pole_url and what that's purpose is? What exactly is that supposed to return? I think after the shopify update, this no longer exists? I was wondering why this const was there and what I should be looking for instead.
In case you're wondering, this is from the ship method
const $ = cheerio.load(body);
const shipping_pole_url = $(
'div[data-poll-refresh="[data-step=shipping_method]"]'
).attr('data-poll-target');
if (shipping_pole_url === undefined) {
const firstShippingOption = $(
'div.content-box__row .radio-wrapper'
).attr('data-shipping-method');
if (firstShippingOption == undefined) {
log(
`${config.base_url} is Incompatible, sorry for the inconvenience. A browser checkout session will be opened momentarily.`
);
open(url);
process.exit(1);
} else {
return submitShipping(config, slackBot, {
type: 'direct',
value: firstShippingOption,
auth_token: $('input[name="authenticity_token"]').val(),
});
}
}
return submitShipping(config, slackBot, {
type: 'poll',
value: shipping_pole_url,
});
}
The text was updated successfully, but these errors were encountered:
To whom it may concern,
I've been trying to get this bot working again, and I've come across something that I can't really figure out. I was wondering if I could get some insight from one of the bot's contributors as to what exactly these lines of code do, specifically the const shipping_pole_url and what that's purpose is? What exactly is that supposed to return? I think after the shopify update, this no longer exists? I was wondering why this const was there and what I should be looking for instead.
In case you're wondering, this is from the ship method
The text was updated successfully, but these errors were encountered: