Created
October 24, 2018 18:40
-
-
Save nagygabor/c592cf73618b179dc618c1e3b98d9890 to your computer and use it in GitHub Desktop.
xnagyg_thankyouredirect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Vásárláskor az egyedi oldalra irányítson át, order és key paraméterekbe tenni az információt. | |
| function xnagyg_thankyouredirect($order_id) { | |
| $order_key = wc_clean( $_GET['key'] ); | |
| $redirect = get_permalink( 338 ); //This is the Custom Shop Thanks page id //TODO: admin option | |
| $redirect = add_query_arg( array( | |
| 'order' => $order_id, | |
| 'key' => $order_key, | |
| ), $redirect ); | |
| wp_safe_redirect( $redirect ); | |
| exit; | |
| } | |
| //Thank you page átirányítás | |
| add_action('woocommerce_thankyou','xnagyg_thankyouredirect',1); //High priority //TODO: lehetne ennél jobb action-t találni!!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment