Woocommerce List categories with Image thumbnail

Try this code: $taxonomyName = “product_cat”; $parent_terms = get_terms($taxonomyName, array(‘parent’ => 0, ‘orderby’ => ‘slug’, ‘hide_empty’ => false)); echo ‘<ul>’; foreach ($parent_terms as $pterm) { echo ‘<li><a href=”‘ . get_term_link($pterm->name, $taxonomyName) . ‘”>’ . $pterm->name . ‘</a></li>’; $thumbnail_id = get_woocommerce_term_meta($pterm->term_id, ‘thumbnail_id’, true); $image = wp_get_attachment_url($thumbnail_id); echo “<img src=”{$image}” alt=”” width=”400″ height=”400″ />”; //Get the Child … Read more

How to Get WooCommerce Product Price

If you are looking for to update the cart item price. You can try: add_action( ‘woocommerce_cart_loaded_from_session’, array(‘update_cart_item_price’ ),10); public function update_cart_item_price( $cart_obj ) { // This is necessary for WC 3.0+ if ( is_admin() && ! defined( ‘DOING_AJAX’ ) ){ return; } if( !WC()->session->__isset( “reload_checkout” )) { foreach ( $cart_obj->get_cart() as $key => $value ) … Read more

Where do I remove admin order fields (unset doesn’t work)

Maybe try this: function custom_admin_billing_fields( &$billing_fields ) { unset($billing_fields[‘state’]); } It’s not clear if when the custom_admin_billing_fields function is called if its return is actually captured and used. So it’s possible that the return is ignored. The ampersand (&) in the parameter definition makes that variable “by reference” instead of “by value”. This way any … Read more

woocommerce add button underneath order details

You can write the below code to your active theme’s functions.php to achieve this: // define the woocommerce_before_checkout_billing_form callback function action_woocommerce_before_checkout_billing_form( $wccs_custom_checkout_field_pro ) { // Write your button code or any html here…. }; // add the action add_action( ‘woocommerce_before_checkout_billing_form’, ‘action_woocommerce_before_checkout_billing_form’, 10, 1 );

Change password notification email

Yes, the email properties are filtered through wp_password_change_notification_email before it is sent (code here), which you can hook to modify them e.g. function set_password_change_notification_email_to( $email, $user, $blogname ) { $email[ ‘to’ ] = ‘[email protected]’; return $email; } add_filter( ‘wp_password_change_notification_email’, ‘set_password_change_notification_email_to’, 10, 3 );