craftcms / commerce

Fully integrated ecommerce for Craft CMS.
https://craftcms.com/commerce
Other
226 stars 170 forks source link

Deleted subscription plans appearing in template #916

Closed cliveportman closed 5 years ago

cliveportman commented 5 years ago

Description

{% set plans = craft.commerce.getPlans().getAllEnabledPlans() %} {% set plans = craft.commerce.getPlans().getAllPlans() %}

Both return plans that I've deleted and are no longer anywhere to be seen in the backend. Currently having to do this to hide them: {% for plan in plans %} {% if plan.id != 4 and plan.id != 1 and plan.id != 3 %}

Steps to reproduce

  1. Delete a plan from within the store's settings.
  2. View template.

Additional info

satcreative commented 5 years ago

Also having this issue when calling: {% for plan in subscription.alternativePlans %}

Plans were deleted in the CP but still display in the template.

lukeholder commented 5 years ago

Looks like a bug. Will look into it now.

lukeholder commented 5 years ago

In your database, so you see your plans in the commerce_plans table with isArchived set to true?

satcreative commented 5 years ago

Yeah, the deleted items have isArchived set to true and a dateArchived has been assigned.

lukeholder commented 5 years ago

Not able to reproduce, could you send your DB to support@craftcms.com thanks.

satcreative commented 5 years ago

I've sent that across.

satcreative commented 5 years ago

Was this resolved in the end or could you not replicate it?

lukeholder commented 5 years ago

Just pushed a fix https://github.com/craftcms/commerce/commit/19b4f63dd220a7ef95f583c998d0db8b2f553073 will be in the next release in next couple hours.

satcreative commented 5 years ago

Oh great. Cheers Luke!