I need to programmatically update Meta Box meta fields by JetEngine for WooCommerce products.I searched all over but couldn't find and clear explanation on how to update the meta fields programmatically.
As you can see in the picture below, The meta field settings have an option to enable REST API, which suggests that it is possible to update the fields programmatically, somehow.
SOLVED
turns out these meta fields get stored as regular metadata in the product object. So updating the fields is as simple as updating the product metadata.
Related
I have developed a custom plugin.
I need a comment option for my plugin.
I have passed a key value as meta key.
In the comment list, it displays all the comments for the particular page, but I want it to display the comments based on the meta key.
Is this possible?
I want to add user data from a user registration form I am adding to my wordpress site via Gravity Forms. I want the address information in my form to be added to the Shipping Address fields that Woocommerce adds to my user profile. This should be simple enough but I need to have the meta keys for these fields. Can anyone tell me where to find these meta keys?
When I look at the code in my user profile it shows the field for shipping address has an id and name of "shipping_address_1". Is this also the meta key?
Thank you!
The field 'name' in the HTML input in the user profile is the meta key. (Note: depending on how a given developer handles creating their inputs, this may or may not be the case; but in the case of WooCommerce it is.)
There is a list of meta keys for WooCommerce's checkout fields on this page:
https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/
I'm using Profi Search form and Advanced Custom field.
Profi Search Form allows me to filter my posts through my custom fields.
The problem is that it's allows me to me to filter with fields I deleted through the interface ACF dashboard.
How can I permanently delete these custom fields ?
Ok, the two solutions I've found :
Delete these posts meta in the database, with MySQL.
Use a plugin like "WP-Cleanup" and delete revisions
I've created some custom fields to make it easier to add specific list items to a section in wordpress then I deleted the post and the custom fields disappear.
Does anybody knows how to keep a custom field after deleting the original post where they where created?
you should use an custom meta box.
In this you can specify your values so each post can access the values:
http://codex.wordpress.org/Function_Reference/add_meta_box
When adding a new post the custom fields from a previous post are showing as meta data for the new post. Is there some way to clear these fields when a new post is being created or is there possibly an issue with my installation?
I think this is a list of available custom fields if you talking about custom fields list in the select box below post editor, otherwise it's impossible that other fields were copied from previous post without any plugin interaction.