Woocommerce custom attributes list help

If I understand your question correctly: <?php global $product; $sizes = $product->get_attribute( ‘size’ ); $sizes = explode(“, “,$sizes); ?> <?php if($sizes[0]!=”){ // if product sizes are defined ?> <ul class=”list-group”> <?php foreach($sizes as $size){ ?> <li class=”list-group-item”><?php echo $size; ?></li> <?php } ?> </ul> <?php } ?>

How to make `wp-list-table` show the` custom-fields` I have in Custom-Post

Solved Situation: // Add the custom columns to the copas post type: add_filter( ‘manage_copas_posts_columns’, ‘set_custom_edit_copas_columns’ ); function set_custom_edit_copas_columns($columns) { //unset( $columns[‘author’] ); $columns[‘coluna_carta’] = __( ‘Carta’, ‘your_text_domain’ ); $columns[‘coluna_naipe’] = __( ‘Naipe’, ‘your_text_domain’ ); $columns[‘coluna_situacao’] = __( ‘Situacao’, ‘your_text_domain’ ); return $columns; } add_action( ‘manage_copas_posts_custom_column’ , ‘custom_copas_column’, 10, 2 ); function custom_copas_column( $column, $post_id ) … Read more

How to call a function from functions.php with ajax?

You mean need to display the custom code your ajax add to cart button right? . add this below code your current active function.php file add_action( ‘wp_ajax_woocommerce_before_add_to_cart_button’, ‘hello_world’, 10); add_action( ‘wp_ajax_nopriv_woocommerce_before_add_to_cart_button’, ‘hello_world’, 10); add_action( ‘woocommerce_before_add_to_cart_button’, ‘hello_world’, 10); function hello_world() { $var1 = ‘Hello World!’; echo $var1; echo “The time is ” . date(“h:i:sa”); }