Woocommerce Добавить в корзину внешний URL-адрес перенаправления ⇐ Php
-
Anonymous
Woocommerce Добавить в корзину внешний URL-адрес перенаправления
Am I doing something wrong using the below code to have the function of Redirection to an external / third party URL when Add to Cart on WooCommerce site?
add_filter( 'woocommerce_add_to_cart_redirect', 'custom_add_to_cart_redirect', 10, 2 ); function custom_add_to_cart_redirect( $redirect_url) { $redirect_url = "https://IWANTTOREDIRECTHERE.COM"; return $redirect_url; } I would like the redirect to external url for ALL products globally across the site but, not sure how I can go about doing this.
Источник: https://stackoverflow.com/questions/780 ... ternal-url
Am I doing something wrong using the below code to have the function of Redirection to an external / third party URL when Add to Cart on WooCommerce site?
add_filter( 'woocommerce_add_to_cart_redirect', 'custom_add_to_cart_redirect', 10, 2 ); function custom_add_to_cart_redirect( $redirect_url) { $redirect_url = "https://IWANTTOREDIRECTHERE.COM"; return $redirect_url; } I would like the redirect to external url for ALL products globally across the site but, not sure how I can go about doing this.
Источник: https://stackoverflow.com/questions/780 ... ternal-url