Sorry wasn't able to respond for a while. Thanks a lot. Unfortunately the script throws an error like shown in the image. According to Google this could be due to an old PHP version (below 7.x) on my webserver. I have checked and it 7.3.5, so this seems to be oke. What should I do?
I didn't read through the whole of the prior ticket to know quite what the intention is here, but I can see a simple error in the code that means it is broken, namely the double quotes wrapping the anchor tag are being broken by double quotes within the anchor tag, so at a minimum you would need to convert the inner double quotes to single quotes, like so:
I don't recognise what the code is trying to do, so I can't say that it will work, so let me assign this ticket to Shane where you can continue the discussion if required.
Correct, I should use single quotes if WP All Import would let me use these, which isn't the case. That's why we've altered the code. But is seems like the dollar sign isn't accepted when importing as well unfortunately. Thanks for passing it on to Shane.
As mentioned previously I cannot guarantee that this will work because it was based on the information from the import plugin team.
Based on that then I assume that the hook should fire.
To make this more specific could you ask them to show you an example of how to use the save post hook in order to modify each post while they are being imported?
I found and example usage here hidden link
However it doesn't provide much information on how to modify the post custom fields with the save post hook.
If we can get an example of this then we should be able to get this code to modify the custom fields while its being imported.
However given that it doesn't work I would highly recommend discussing this with their team to see if they can figure why its not work.
I've followed their hook and only added the line that is meant to modify the post field so i'm not sure what else to actually do at this point because all you should need to do is update the fields with these values.
Thanks. I have contacted WP All Import and it looks like the hook isn't firing. So I have created a ticket at their website and get back to you if needed. Thanks.