Questions tagged [custom-fields]

WordPress custom fields: author-entered post metadata

custom-fields
Filter by
Sorted by
Tagged with
1 vote
1 answer
519 views

Metabox with multi checkbox in WooCommerce admin single orders

I added successfully a Metabox with a multi checkbox field that is displayed on admin single order pages and works perfectly. I am using Multi checkbox fields in Woocommerce backend answer code for ...
Vladimir Kyatipov's user avatar
0 votes
0 answers
95 views

Why do WP_Query results change after updating unrelated Advanced Custom Fields (ACF)?

TLDR - After manually updating a custom post, my WP_Query will change it's sorting order and move that updated post to the end of the array response. I have a custom post type called Events that use ...
Nate Witty's user avatar
0 votes
1 answer
394 views

How to set custom checkout payment fields from custom WooCommerce Payment gateway

I created the plugins and added custom fields on the checkout page like payment_mode & transaction id. public function process_payment( $order_id ) { global $woocommerce; $order = new ...
Mukhila Asokan's user avatar
-1 votes
1 answer
563 views

How to add a custom nickname field on WooCommerce My Account's edit page [closed]

I have customized the myaccount/form-edit-account.php WooCommerce template file. So that a customer in addition to the default fields first name, last name, display name, email and password. Now also ...
David Arrouch's user avatar
1 vote
1 answer
2k views

Validate custom fields added above the “Add To Cart” in Single Product pages

I have added the form above the Add To Cart button in single product page in WooCommerce and I want to validate the form, like without filling the form user should not be able to click the Add To Cart ...
Rahul Pamnani's user avatar
2 votes
1 answer
2k views

Add and display custom cart item data in WooCommerce orders and emails

I have a custom woocommerce product type called lottery. I needed a custom select field on it (because it's not a variable product) So I added one. Everything is working nice i'm getting the value in ...
Aastone's user avatar
  • 123
2 votes
1 answer
2k views

How to display custom checkout billing field in WooCommerce admin single orders

During the checkout process, under Company, I have another field for Company Registration Number. Now, everything works fine, the field is correctly saved under each order but I was wondering how can ...
Andrei RRR's user avatar
  • 3,114
0 votes
2 answers
895 views

Customization on WooCommerce variable product with custom fields

We have created a site using WooCommerce and WordPress with predefined products. However, Product A must have variations, to resolve this, we added custom fields such as Colors, Dimensions, etc... Now ...
user1027620's user avatar
  • 2,775
1 vote
2 answers
2k views

woocommerce_wp_select save selected option and display in front end

I face a problem regarding woocommerce_wp_select . I am adding new fields to the single product page. First, I add the options by the following codes: $title_110 = array( 'id' => '...
Sallar Rabiei's user avatar
3 votes
1 answer
2k views

Save checkout custom field value and display it in WooCommerce admin orders

I have some additional fields in my checkout for asking questions from the customer about certain things regarding their order. Most of these are text input fields but there's one Select menu asking ...
Adam Bell's user avatar
  • 1,037
0 votes
0 answers
830 views

Get input number field value into a PHP in WordPress /Woocommerce

I try to make custom calculator on product page. I made a calculator and script which calculated. But all start values is static now. This calculator should work with custom values each product. I ...
user avatar
2 votes
1 answer
654 views

Increase the displayed text size of a WooCommerce email custom field

I want to increase the text size of just the custom field in the HTML email. How can I do it using this code? add_filter( 'woocommerce_email_order_meta_fields', '...
Prophet Tech's user avatar
1 vote
1 answer
48 views

How to skip orders having specific meta in admin bulk order action

I am creating Bulk upload shipments in woocommerce. I created a order status name trax-booked and in order admin we can bulk select the order to submit shipments in courier platform. This is my code ...
Hannah James's user avatar
1 vote
1 answer
309 views

Save Multiselect custom filed on woocommerce product page

When I try to retrieve data from multiselect custom field I get just the array keys not values like below: array (size=2) 0 => string '0' (length=1) 1 => string '1' (length=1) and this is ...
testzaki's user avatar
1 vote
1 answer
121 views

Wordpress: Exporting month and year of post into custom meta field

I would like to save publish date of regular Wordpress post into custom meta fields. Is there any way how to write function based on scenario below? Demanded scenario: When I save/create post, some ...
Johnny Frost's user avatar
0 votes
1 answer
181 views

Only allow edit of custom field once per customer on My account > edit account in WooCommerce

I have added a DOB field to the WooCommerce My account section Account details. The field is a date field (date of birth). The customer can edit and save. Problem is; the customer can edit and save ...
user avatar
0 votes
2 answers
32 views

add specific text to a customm fields with php (wordpress)

I want to add text "Genre:" to the beginning of this custom field <?php the_field('im_genre'); ?> the reason that i dont simply add something like this <li>Genre:<?php ...
arsaces's user avatar
  • 49
0 votes
1 answer
175 views

Cannot access form.first_name and form.email from django default authentication form

I am using the default Django AuthenticationForm() for the user login feature. Now when I see inside the user model in Django admin it has fields like username, email address, first name last name and ...
Reactoo's user avatar
  • 976
0 votes
1 answer
786 views

How display a product custom field value in WooCommerce?

I try to make custom calculator on product page. I made a calculator and script which calculated. But all start values is static now. This calculator should work with custom values each product. I ...
user avatar
0 votes
1 answer
1k views

woocommerce checkout custom fields update order meta

based on this https://stackoverflow.com/a/49163797/7783506 by @LoicTheAztec I was able to create the custom fields on flat rate shipping method, I could find the data on MySQL, but it was not showing ...
Jeffrey Tanuwidjaja's user avatar
1 vote
1 answer
3k views

wordpress allow admin to edit user profile with custom fields

I am trying to customize a Wordpress site user's profile with some custom fields. The custom fields should then display on the front-end. I've managed to display the fields on the user admin dashboard ...
Wayne R Hendricks's user avatar
-3 votes
2 answers
652 views

Make custom checkout required field created by plugin optional in WooCommerce

In woocommerce checkout page need to remove a specific custom field validation. This field is basically generated by a plugin using woocommerce_form_field().Is there any way to remove the validation ...
Arunava Sarkar's user avatar
1 vote
1 answer
3k views

Custom phone number field not showing in WooCommerce order email

I have successfully added the phone number field in Ship to different address and the phone number is showing in back-end as well. However I am not receiving the phone number in email. Kindly Help ...
jeet singh's user avatar
0 votes
1 answer
439 views

How can I get value from user custom field

I have a calculated field in which I want to add a value from a previously created custom field by user (position, manager) example here https://i.stack.imgur.com/Bg9uX.png I managed to pass to the ...
Sindorei's user avatar
0 votes
0 answers
39 views

Adding woocommerce custom fields at checkout fatal error $checkout->get_value() [duplicate]

I want to add the some custom fields at checkout with woocommerce and then use this info to call an API to validate the data provided. For this I need these fields to be created and registered in the ...
Eliott's user avatar
  • 89
4 votes
2 answers
18k views

How to add custom textbox field on shopify product page

I need to add custom textbox field on shopify product pages. My requirement is to add textbox field on product page and when customer add product in cart than that textbox field value also display on ...
user49799's user avatar
  • 109
2 votes
1 answer
2k views

How do I re-order or add priority to a custom field on WooCommerce "My Account" page

I have multiple fields in "My Account" page, so, I wanted to add additional field for Date of Birth. I am using part of Add birthday field to my account and admin user page The field shows ...
jeet singh's user avatar
0 votes
1 answer
341 views

Trying to populate custom fields in Wordpress from WP database

I'm trying to populate a custom field, let's say 'field_123' (in this case from ACF plugin) with data from a Wordpress database table (which is coming from an API), let's say 'house' > '...
Codigit's user avatar
  • 71
2 votes
1 answer
5k views

Display custom field value in WooCommerce single product pages via hook

I don't know much about PHP yet, but I'm trying to place some content in my single product pages by using the woocommerce_before_add_to_cart_form hook. I succeeded in making a code that prints my text ...
Tomm324's user avatar
  • 23
2 votes
1 answer
118 views

Allow a custom field value to be removable in WooCommerce

I added a custom subtitle field for woo-commerce products. When I fill its field from the dashboard it appears in the product. I can update the text but I can't remove its value it appears again when ...
awais rajpoot's user avatar
0 votes
1 answer
932 views

Wordpress hide post from custom post-type on a single page

Initial situation custom post-type (projects)[projects.php] <?php namespace main_theme\ext\posttypes\projects; function post_type() { $labels = [ 'name' => _x( '...
hendrik-eg's user avatar
0 votes
1 answer
489 views

Updating a field with a function in wordpress

I'm trying to code a function that will automatically tick a check box field in the back-end when the post status is set to 'publish'. This is in my functions.php btw. function featured_post(){ if( ...
michael74's user avatar
1 vote
3 answers
312 views

Display multiple product custom fields within a loop in WooCommerce

I have created 5 custom meta values for my products on WC but not every product have all custom fields. At the moment, I am displaying the meta data like so: <div class="meta"> <?...
Dan's user avatar
  • 11
0 votes
1 answer
1k views

Wordpress Meta Fields Not Showing in Post Editor

a little new to working with WP and Custom Meta Fields. I'm trying to learn REST API and created a plugin to register a custom metafield. This is the plugin: /** * @package api_testing * @version 1....
DLateef's user avatar
  • 251
0 votes
0 answers
147 views

How do I set the value of a WordPress custom field from another custom field?

The user is asked to provide a custom field value whilst filling in a form: an event_end_date to show in an event listing when an event has finished. I want to be able to take that value and also ...
JayPatrol's user avatar
2 votes
1 answer
954 views

Display a product custom field for variable products in WooCommerce email order items

I've added a Custom SKU in products to use for vendor SKU for order confirmation email. What I've created works only for simple products and not variable products. Custom SKU, I added this to the ...
Troy's user avatar
  • 23
2 votes
1 answer
2k views

How to add a custom checkout field in specific location on WooCommerce

Im adding a custom address field in checkout with this code: add_filter( 'woocommerce_checkout_fields' , 'checkout_address_details_fields' ); // Our hooked in function – $fields is passed via the ...
svelandiag's user avatar
  • 4,302
2 votes
1 answer
809 views

Displaying a second custom field on WooCommerce email notifications

I have added two custom fields to my WooCommerce checkout page. I managed to get them to show up on the front end, and on the back end. The next step is to get the fields to display in the order ...
J.K.'s user avatar
  • 167
-1 votes
1 answer
205 views

WooCommerce disabled custom field addition to their free plugin? [closed]

I am unable to create custom fields through WooCommerce Hooks as shown function woocommerce_product_custom_fields() { global $woocommerce, $post; echo '<div class="product_custom_field&...
Lenin's user avatar
  • 592
2 votes
1 answer
414 views

Adding Product Custom Fields to WooCommerce Completed Order Emails

Is there any way that I can add some Product custom field I create to include in WooCommerce Completed Order email. I have created come custom fields as below : And I have added some code to my theme'...
Yanuar's user avatar
  • 29
1 vote
1 answer
330 views

Add a custom field as a default value in WooCommerce backend and populate previous orders

I know that the first part of my question is possible but haven't found how to add a custom field to all orders in the back end and then populate it with a default value. I'm looking to create a ...
Mike Devitt's user avatar
1 vote
1 answer
762 views

Show custom field as external link in WooCommerce

I have the code that shows the custom fields on the single product page and the WooCommerce archive page. // Backend: Add Designer Fields add_action( 'woocommerce_product_options_general_product_data',...
Dmitry's user avatar
  • 153
0 votes
1 answer
647 views

Add as separate cart row for a product with custom data in Woocommerce review order (checkout) and cart total (cart) pages

I currently need to sell a service with a subservice as option : I have hadded a product panel & 2 meta for my option and its price. If the user checks a checkbox in the product page, then the ...
jst's user avatar
  • 141
1 vote
3 answers
2k views

Woocommerce - Display payment method "payment on delivery" only for Admin Users

Please, how can i set on Woocommerce the payment method "payment on delivery" only for Admin Profile User? Is that possible? This means, the payment method "payment on delivery" ...
Paulo do Porto's user avatar
2 votes
1 answer
1k views

Get and display product custom field on WooCommerce archive pages

I have successfully added a custom Metabox to admin product pages. The above code generate an Input type text in the Admin-Area where I can insert the city name: add_action( 'save_post_product', '...
Paulo do Porto's user avatar
4 votes
1 answer
2k views

How to add HTML5 'required' attribute to woocommerce_form_field

I'm currently working on the WooCommerce registration page in my WordPress theme and added a hook for users to accept the Terms & Conditions - see PHP code added. HTML5 provides a super helpful ...
AlphaX's user avatar
  • 633
4 votes
1 answer
1k views

Save product custom-field as custom order item metadata for WooCommerce admin manual orders

Using Pass custom product meta data to the order in Woocommerce 3 answer code, Is it possible to save and display custom metadata when the product is added manually from backend when creating orders ...
Williams's user avatar
  • 421
2 votes
1 answer
278 views

How to output multiple custom fields on a WooCommerce hooked function?

I'm using the following bit of code to get data from ACF to the additional info tab on the single product page. Now I need to add multiple of these labels with values. I tried a few things but I cant ...
Jim Rijsberman's user avatar
4 votes
1 answer
14k views

How should I change the woocommerce_form_field HTML Structure?

I'm using WooCommerce: Add Checkout Fees Based on Custom Radio Button from businessbloomer My question is about woocommerce_form_field() which is used in part 1 // etc... echo '<div id="...
Kaloyan Nikolov's user avatar
3 votes
0 answers
715 views

Revolution Slider - Post Based Slider with ACF Custom Field Background Image

Anyone managed to get RevSlider Post Based to show a custom field image as background instead of the default featured image? I have set up a few custom fields on a CPT and everything shows up ok. But, ...
Red Wolf's user avatar

1
3 4
5
6 7
31