Meta – Custom Field illegal characters or syntax rules
-
I wanted to be able to use a second sku number assigned to my products. I was able to create a custom field ‘ stock# ‘ for my products by exporting from Woocommerce and adding a column, Meta: stock#, then importing. It worked and I am able to export, create reports in Excel and modify products, pricing etc. as well as the stock# and import. As expected, I can’t see the meta field in the Woocommerce backend or on invoices. Now I’m trying to show the meta – custom field by using php code/hooks in the plugin: code snippets. I’m getting a syntax error. Before I troubleshoot that further, I wanted to know if using the character ‘ # ‘ is a bad idea and could be causing the problem. I don’t know if this is a general coding rule or specific to php. If using the character ‘ # ‘ is not a problem, I’ll continue to troubleshoot code snippets etc. If it is a problem, what would be the way to change it since I can’t see meta data – custom fields in the backend? Would I export products to csv and change the column header from ‘ meta: stock# ‘ to something like ‘ meta: sku2 ‘ ? I searched the Woocommerce documentation, but didn’t see that using charcters like ‘ # ‘ was mentioned. I don’t know if there are rules to creating custom fields. I didn’t know if using ‘ sku ‘ again in ‘ sku2 ‘ might even create a problem. Maybe this is common sense, but I don’t know. Thanks for your help. I’m not familiar with coding and will start by learning about php. Any recommended resources are greatly appreciated.
The page I need help with: [log in to see the link]
- The topic ‘Meta – Custom Field illegal characters or syntax rules’ is closed to new replies.