How would I Redirect an existing WooCommerce customer to a specific url after Checkout

The following should suffice. It will redirect to your custom URL only if the order has not failed. add_action( ‘woocommerce_thankyou’, ‘ii_redirect_thankyou’); function ii_redirect_thankyou( $order_id ){ $customer_orders = get_posts( array( ‘numberposts’ => 2, // getting 2 as by the time this purchase has happened the count will be 1. ‘meta_key’ => ‘_customer_user’, ‘meta_value’ => get_current_user_id(), ‘post_type’ … Read more

Custom Email via Hook only for completed order

If your code works but it works for all emails you can add a check for only completed orders like this add_action( ‘woocommerce_email_before_order_table’, ‘mm_email_before_order_table’, 10, 4 ); function mm_email_before_order_table( $order, $sent_to_admin, $plain_text, $email ) { // if not completed order, exit if ($email->id != ‘customer_completed_order’) return; echo ‘<p>extra information</p>’; }

Conditional label Woocommerce archive [unsolved]

You need to access the Woo product loop, to output extra content on shop/archive pages (unless you use a custom template) Try something like this: add_action( ‘woocommerce_after_shop_loop_item’, ‘conditional_label’, 5 ); function conditional_label() { global $product; if (has_term( ‘new’, ‘product_cat’, $product->get_id())) { echo ‘<p class=”new-lable”>New</p>’; } } Not tested, but should get you in the right … Read more