Changing the order of custom fields in the dashboard for Woocommerce variable products [closed]

The meta box template for the variations is defined in the file html-variation-admin.php. There you will find the hook “woocommerce_variation_options_pricing”. With this hook you can add your input field to the desired place. function variation_settings_fields($loop, $variation_data, $variation) { // Your Text Field woocommerce_wp_text_input( array( ‘id’ => ‘_text_field[‘ . $variation->ID . ‘]’, ‘label’ => __(‘My Text … Read more

How to add custom filed value after in wp post title

It is a simple 3 step process: Look for your post title markup that should look something like: <h1><a href=”https://wordpress.stackexchange.com/questions/311624/<?php the_permalink(); ?>”><?php the_title(); ?></a></h1> Now, get your post custom meta value through: <?php $bannerContent = get_post_meta($post->ID, ‘bannerContent’, true); ?> Next add this value to your title where ever you need: <h1><a href=”https://wordpress.stackexchange.com/questions/311624/<?php the_permalink(); ?>”><?php the_title(); … Read more

WP All Import / Update stock quantity from multiple XML files

I managed to get it working, here is answer: – when importing update new stock to custom field: _custom_stock_placeholder – update only this field: _custom_stock_placeholder – add this code to functions.php add_action(‘pmxi_saved_post’, ‘post_saved’, 10, 1); function post_saved($id) { $original_stock = get_post_meta($id, ‘_stock’, true); $new_stock = get_post_meta($id, ‘_custom_stock_placeholder’, true); $combined_stock= $original_stock + $new_stock; update_post_meta($id, ‘_stock’, $combined_stock); … Read more