how i can add more required * fields in checkout page?

If you at least know how to open your “functions.php” file, the following should work if you simply add it at the bottom of your functions.php file of your (child-)theme: // Hook in add_filter( ‘woocommerce_checkout_fields’ , ‘custom_add_checkout_fields’ ); // Our hooked in function – $fields is passed via the filter! function custom_add_checkout_fields( $fields ) { … Read more

Change the method of a class from child function.php

In you case i am considering this is direct function attached to shortcode. You can create your own shortcode and use it to display what you want. You can try this hack hope it will help you, add_shortcode( ‘custom-bewpi-download-invoice’, ‘print_invoice_func’); function print_invoice_func( $atts ) { if ( ! isset( $atts[‘order_id’] ) || 0 === intval( … Read more

remove categories from product

I have found the solution, actually it is very simple: $terms = get_the_terms($product_id, ‘product_cat’); foreach($terms as $term){ wp_remove_object_terms($product_id, $term->term_id, ‘product_cat’); } This code get all the therms with the ‘product_cat’ taxonomy, with a foreach loop I remove all the items.

Place Order button in Checkout

This question has been answered here. Basically, you want to use a switch statement hooked to the gettext filter. One benefit of this method is, if you need to change more text down the line you can just add another case to the function. For example: add_filter( ‘gettext’, ‘wpsx_replace_text_string’, 20, 3 ); function wpsx_replace_text_string( $translated_text, … Read more

Order list woocommerce Orders based on meta for custom status

I’ve solved my problem myself, thanks function filter_priority_orders($query) { global $pagenow; $qv = $query->query_vars; if ( $pagenow == ‘edit.php’ && isset($qv[‘post_status’]) && $qv[‘post_status’] == ‘wc-priority-order’ && isset($qv[‘post_type’]) && $qv[‘post_type’] == ‘shop_order’ ) { $query->set(‘meta_key’, ‘_priority_list’); $query->set(‘orderby’, ‘meta_value_num’); $query->set(‘order’, ‘ASC’ ); } return $query; } add_filter( ‘pre_get_posts’, ‘filter_priority_orders’ );