Hi I’m trying here to remember the value that I put in this text area which is placed in a custom column, currently when I refresh the value disappears and I’m not sure how to do it any suggestions ? This is my temporary code. And I am trying to do this in WordPress in Woo Commerce. But I cannot find the answer I searched on Internet how I can do this but I cannot find anything anybody some suggestions ?
<?php
/**
* _ _ _
* __ ___ __ | | | | ___ ___ | |_
* / / / '_ | |_| |/ _ / _ | __|
* V V /| |_) | _ | (_) | (_) | |_
* _/_/ | .__/|_| |_|___/ ___/ __|
* |_|
* -------------------------------------------
* ------- code inspired from Hybrid, --------
* -- Underscores Theme, Customizer Library --
* -- (see readme file for copyright info.) --
* -------------------------------------------
*
* :: Theme's main functions file ::::::::::::
* :: Initialize and setup the theme :::::::::
*
* To modify this theme, its a good idea to create a child theme. This way you can easily update
* the main theme without loosing your changes. To know more about how to create child themes
* @see http://codex.wordpress.org/Theme_Development
* @see http://codex.wordpress.org/Child_Themes
*
* Hooks, Actions and Filters are used throughout this theme. You should be able to do most of your
* customizations without touching the main code. For more information on hooks, actions, and filters
* @see http://codex.wordpress.org/Plugin_API
*
* @package Hoot Du
*/
/**
* Run in Debug mode to load unminified CSS and JS, and add other developer data to code.
* - You can set HOOT_DEBUG to true (default) for loading unminified files (useful for development/debugging)
* - Or set HOOT_DEBUG to false for loading minified files (for production i.e. live site)
*
* NOTE: If you uncomment this line, HOOT_DEBUG value will override any option for minifying
* files (if available) set via the theme options (customizer) in WordPress Admin
*/
if (!defined('HOOT_DEBUG') && defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
define('HOOT_DEBUG', true);
// Get the template directory and make sure it has a trailing slash.
$hoot_template_dir = trailingslashit(get_template_directory());
// Load the Core Hoot Framework Library files
require_once($hoot_template_dir . 'library/init.php');
// Load up the Theme files
require_once($hoot_template_dir . 'include/hoot-theme.php');
// For displaying in columns.
add_filter('manage_edit-shop_order_columns', 'set_custom_edit_shop_order_columnsex');
function set_custom_edit_shop_order_columnsex($columns)
{
$columns['custom_column'] = __('Custom Column', 'your_text_domain');
return $columns;
}
add_action('manage_shop_order_posts_custom_column', 'custom_shop_order_columnsex', 10, 2);
function custom_shop_order_columnsex($column)
{
global $woocommerce, $post;
echo '<div class="column_custom_field">';
switch ($column) {
case 'custom_column':
?>
<div class="wrap">
<label for="header_scripts">Header Scripts</label>
<textarea name="header_scripts" class="large-text"><?php print $column; ?></textarea>
<button onClick="window.location.reload();">Update</button>
</form>
</div>
<?php
break;
return $column;
}
}