Last active
October 23, 2018 11:09
-
-
Save wooexperte/2534b86a84c5d9eff8046648bc5c15e2 to your computer and use it in GitHub Desktop.
WooCommerce Snippet Benutzer statt Warenkorb auf eine benutzerdefinierte Seite umleiten
This file contains 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
/** | |
* Redirect Kunden nach dem Hinzufügen von Produkt in den Warenkorb. | |
*/ | |
function my_custom_add_to_cart_redirect( $url ) { | |
$url = get_permalink( 1 ); // URL zum Weiterleiten an (1 austauschen gegen Seiten-ID) | |
return $url; | |
} | |
add_filter( 'woocommerce_add_to_cart_redirect', 'my_custom_add_to_cart_redirect' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment