Skip to content

Instantly share code, notes, and snippets.

@uptimizt
Created December 10, 2015 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uptimizt/961e2a70240aa976cd5b to your computer and use it in GitHub Desktop.
Save uptimizt/961e2a70240aa976cd5b to your computer and use it in GitHub Desktop.
Добавляем поля на форму категорий продуктов
//Добавляем поля на форму категорий продуктов
function mss_uuid_product_cat_form($term){
wp_nonce_field( basename( __FILE__ ), 'mss_uuid_product_cat_nonce' );
?>
<div class="form-field mss_uuid_product_cat">
<label for="mss_uuid_product_cat">uuid МойСклад</label><br/>
<input type="text" name="mss_uuid_product_cat" id="mss_uuid_product_cat" value="<?php echo get_term_meta( $term_id, 'uuid_product_category_mss', true ); ?>" />
<p><small>Это поле идентификатор для синхронизации с МойСклад</small></p>
</div>
<?php
}
add_action( $tag = 'product_cat_edit_form_fields', $function_to_add = 'mss_uuid_product_cat_form', $priority = 10 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment