Reputation: 88
I am using armember plugin to create a form and also use stripe plugin to integrate the payment gateway. so I have two stripe plugin one for armember and one for another class so. I am getting this error:
PHP Fatal error: Cannot declare class Stripe\Stripe, because the name is already
please help to resolve this.
Upvotes: 0
Views: 2572
Reputation: 184
There is a conflict between two plugins as both of them are trying to initialize their own stripe class where as you can only have one class at a time with the same name. One solution would be to find the exact code where this issue is occurring and just wrap that code with a check. Something like this.
if (!class_exists('Stripe\Stripe'))
{
//wrape the class here
}
Upvotes: 0
Reputation: 70
It is looking like Stripe class name exists in both plugins and we can't use two classes with the same name in same module/directory.
To resolve it, customize one plugin i.e replace the class name and it's all reference in the plugin from Stripe to MyStripe, it will make the class unique and then you can use both classes without any conflict
Upvotes: 1