User and Order Custom Fields

mail@pastecode.io avatar
unknown
php
2 years ago
1.1 kB
3
Indexable
Never
/* User Field */
add_action('salesking_customers_custom_columns_header', function(){
    ?>
    <th class="nk-tb-col tb-col-md"><span class="sub-text"><?php esc_html_e('Custom User Field Title','salesking'); ?></span></th>
    <?php
});
add_action('salesking_customers_custom_columns_content', function($user){
    ?>
    <th class="nk-tb-col tb-col-md"><span class="sub-text"><?php esc_html_e('Custom Field Content','salesking'); ?></span></th>
    <?php
}, 10, 1);



/* Order Field */
add_action('salesking_my_orders_custom_columns', function(){
    ?>
    <th class="nk-tb-col tb-col-sm"><span class="sub-text"><?php esc_html_e('Custom Order Field Title','salesking'); ?></span></th>
    <?php
});
add_action('salesking_my_orders_custom_columns_content', function($order){
    ?>
    <th class="nk-tb-col tb-col-md"><span class="sub-text"><?php esc_html_e('Custom Field Content','salesking'); ?></span></th>
    <?php
}, 10, 1);

add_action('salesking_my_orders_custom_columns_footer', function(){
    ?>
    <th class="nk-tb-col tb-col-md"><?php esc_html_e('footer','salesking'); ?></th>
    <?php
});