2

Webhooks are like callback events. Basically when something happens on Stripe's side (eg a new customer created, a trial subscription cancelled, etc.) your application can get notified as well and take the appropriate action. They're less useful when your application controls that entire process but in the case of subscriptions, let's say the customer's card ...


2

Ok so with these the trick is to look for anything that might involve a request session, which is not available when you're running things via a console request. In this case there's at least one obvious suspect line: Craft::$app->session->setError('Lightspeed....); Indeed there's more than one of these. It's basically the same problem as previously - ...


1

Your code looks like it actually has a further problem that you're only fetching the first order for a given user. Rather than eager loading (which is basically creating joins so that the relevant data is fetched in one go), why not use a hash map to look up each customer's set of orders? So, outside your users loop, create a separate query to fetch all ...


1

You can use the same technique to set the line item data like this: {% set order = craft.orders.id(123).one() %} {% for lineItem in order.lineItems %} {% do lineItem.setAttributes({lineItemStatusId: 2}, false) %} {% endfor %} {% do order.setAttributes({ orderStatusId: 4, lineItems: order.lineItems }, false) %} {% do craft.app.getElements()....


1

Commerce doesn't support multiple stock sources out of the box but you might be able to work around it, depending on your requirements. To expand on your thoughts... Variants How are your products set up? Commerce doesn't add a product directly to a user's cart, it's actually Purchasable—with Variants being one of the purchasables in Commerce. If your ...


1

While I’m not sure exactly what caused the issue after my client purchased the Craft Commerce Pro license, it was eventually fixed by restoring the database, upgrading Craft and Craft Pro to the current versions on my local machine, pushing those changes to the dev server, and allowing the upgrade scripts to run in full on the dev server. Thanks to @Brad for ...


Only top voted, non community-wiki answers of a minimum length are eligible