WPIntell

Source evidence

other solution

Custom Thank You Page Per Product for WC · review · 2017-09-12T21:42:00+00:00

complaintsentiment
mediumseverity
0.69relevance
1replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 23 rows with source links

17.4% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

19 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

review · 1 stars
aladinDr unresolved
because this plugin not work anymone , i suggest to any wp user my solution , it’s simple code can be added in you function.php in your theme , or by code snippet plugin : add_action( ‘woocommerce_thankyou’, ‘ad_redirectcustom’); function ad_redirectcustom( $order_id ){ global $current_user; $order = new WC_Order( $order_id ); $items = $order->get_items(); $product_id=223074;//id of your product $product_id2=223076;// must be change by id of you product foreach ( $items as $item ) { $url =”; $url2=”; if (($order->status!=’failed’)&&(product_id==$item[‘product_id’])) { wp_redirect($url); exit; } else if (($order->status!=’failed’)&&($product_id2==$item[‘product_id’])) { wp_redirect($url2); exit; // } } } u can do many conditions as you want , if you don’t understand code , please give me comment in my gist : here https://gist.github.com/AladinDridi/442db23c731fae9d6dfb54e10f3e6014 This topic was modified 8 years, 8 months ago by aladinDr . Thank you so much for this! I do have a question though. What if I need to do this for multiple products? Do I include them as $product_id3, $product_id4 etc? Or does this code have to be inserted for each product and URL?

Comments

1 shown
fuadmurad 2017-09-30T02:01:00+00:00

Thank you so much for this! I do have a question though. What if I need to do this for multiple products? Do I include them as $product_id3, $product_id4 etc? Or does this code have to be inserted for each product and URL?