Skip to content
Advertisement

Namespace with extend from wordpress class not working

I’m having trouble with namespaces. When I put a namespace, my application will look for the class I extend in the namespace, while I want my namespace to be for my Quote_Recieved class.

namespace emails;

class Quote_Received extends WC_Email { 
...

But I have this error :

Uncaught Error: Class 'emailsWC_Email' not found in C:xampphtdocswordpress.....

How I can put my namespace for Quote_Received and not WC_Email ? Thanks.

Advertisement

Answer

Is solved by @CBroe and his comment :

Use WC_Email, so that it looks for the class in the global namespace

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement