Here is the code where I’m getting error:
function wc_get_container() : \Psr\Container\ContainerInterface {
return $GLOBALS[‘wc_container’];
}
-
This reply was modified 5 years, 3 months ago by
rajashrihj.
function wc_get_container() {
return $GLOBALS[‘wc_container’];
}
That maybe works?
That error resolved. But same error it is showing in other codeblock.
public function add( string $class_name, $concrete = null, bool $shared = null ) : DefinitionInterface {
Error is pointing to this line.
Any solution to this…
All these codes are pre generated. While working in the localhost, there were no errors. It was working fine. When hosted the site, all these errors are coming.
-
This reply was modified 5 years, 3 months ago by
rajashrihj.
Seems like either you are missing some files or you are using plugin that overrides function incorrectly.
try reinstalling woocommerce and if that doesn’t work try to disable all the plugins.
functions should not have : after the brackets of the function, but maybe it’s some modification woocommerce plugin has done.
I haven;t missed any files. I have uploaded the entire folder as a zip file and extracted. Tried reinstalling it but still isn’t working. By disabling it I’ll the functionalitites which I need. How can this be resolved.
Hi @rajashrihj. Have you been able to resolve this issue? If not, can you try re-installing WooCommerce via FTP?