How to redirect based on text clicked?

[ad_1]

Goal: On the WooCommerce Orders page, I would like to redirect the user to a page if they click the order status text (Processing, Completed, etc) I also have custom order statuses like (Received, Fixing, & “Shipping to customer”)
I have this code that will redirect when a class is clicked, it works! But I would like more functionality.

function custom_woocommerce_redirect_scripts() { // Check if it’s a WooCommerce page if (is_woocommerce()) { // Register and enqueue the script wp_enqueue_script(‘custom-woocommerce-redirect’, get_template_directory_uri() . ‘/js/custom-woocommerce-redirect.js’, array(‘jquery’), ‘1.0’, true); } } add_action(‘wp_enqueue_scripts’, ‘custom_woocommerce_redirect_scripts’);

I will have a page that breaks down the buyers process, and it would scroll down to the relevant section (Processing, Fixing, Completed, Shipping to customer, etc)”

Is there a way to have the jquery to redirect to the # section ID based on the text inside the class that the code sees?

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer