Woocommerce Update the Order meta with Custom Field value [Custom Field Display 1]
/**
* Update the order meta with field value
*
* PHP Custom Feild Value
*
*
*/
add_action( 'woocommerce_checkout_update_order_meta', 'my_custom_checkout_field_update_order_meta' );
function my_custom_checkout_field_update_order_meta( $order_id ) {
if ( ! empty( $_POST['store_location'] ) ) {
update_post_meta( $order_id, 'My Field', sanitize_text_field( $_POST['store_location'] ) );
}
}
Also in PHP:
- date now in php
- add custom helper laravel
- create laravel seeder
- current url php
- add 5 days to current date in php
- codeigniter db last id
- enable warnings php
- eloquent get query log
- Your Composer dependencies require a PHP version >= 7.2.0. You are running 7.1.30. in /opt/app-root/src/vendor/composer/platform_check.php on line 24
- current date into time
- change max_execution_time php
- check array key php
- Assume that a database connection is established using a PDO object named $db
- E: Unable to locate package php7.2-mbstring
- check string is present or not in php
- element contains in key array php
- download xampp php 7.3
- catch http exceptions php
- date() today php
- AWS HTTP error: SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
- Extension DOM is required.
- current time php
- .length php
- cast array to object php