VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: webgobe on September 29, 2024, 18:17:50 PM

Title: Error after upgrading an old plugin to VM4
Post by: webgobe on September 29, 2024, 18:17:50 PM
After upgrading an old custom fields plugin written for VM3, when I add the new custom field to a product on save I got this error:
vmError: Plugin plgVmCustomMyParam must be updated, called in vmcustomplugin.php OnStoreProduct The plugin seems to work, but the error message is annoying.
I found somewhere that adding the $key variable to the OnStoreProduct like there:
function plgVmOnStoreProduct($data,$plugin_param,$key=-1){should solve the issue, but the error is still there. Any help would be greatly appreciated!
Title: Re: Error after upgrading an old plugin to VM4
Post by: webgobe on September 30, 2024, 08:57:50 AM
Nevermind, I missed one instance of the call for the OnStoreProduct. Adding the $key to the call solved the problem.