{"id":1111366,"date":"2016-05-06T03:53:56","date_gmt":"2016-05-06T10:53:56","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/"},"modified":"2016-05-21T09:35:04","modified_gmt":"2016-05-21T16:35:04","slug":"redirect-to-checkout-behaving-strangely","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/","title":{"rendered":"Redirect to checkout behaving strangely"},"content":{"rendered":"<p>hello there<\/p>\n<p>im trying to bypass the basket when clicking the buy button on a single product view<\/p>\n<p>i found someone else having a similar problem here:<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"x1HSRNuQlr\"><p><a href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-prevent-auto-redirection-to-cart-after-adding-item\/\">How to prevent auto redirection to cart after adding item<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;How to prevent auto redirection to cart after adding item&#8221; &#8212; \" src=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-prevent-auto-redirection-to-cart-after-adding-item\/embed\/#?secret=Ug3PcXzu6y#?secret=x1HSRNuQlr\" data-secret=\"x1HSRNuQlr\" width=\"580\" height=\"327\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>unfortunately there&#8217;s no solution there, so im hoping to re-raise the issue<\/p>\n<p>im using the following plugins: <\/p>\n<p>Event Tickets 4.1.3<br \/>\nEvent Tickets Plus 4.1.2<br \/>\nThe Events Calendar 4.1.3<br \/>\nWooCommerce 2.5.5<\/p>\n<p>WordPress version 4.5.1 <\/p>\n<p>basically in the woocommerce settings page, there is a redirect \u201cRedirect to the cart page after successful addition\u201d option, i can set it to off OR on, and it still redirects to the cart page. Ive tried Jami&#8217;s advice in the previously mentioned post by switching my theme to twenty thirteen (i also tried twenty fourteen and twenty sixteen), and disabling all other plugins, and im still getting the same behavior<\/p>\n<p>ive also tried hooking into the add_to_cart_redirect() function by adding the following code (which seems to work for other woocommerce users that are not using the events calendar plugin) to my functions file <\/p>\n<pre><code>add_filter (&#039;add_to_cart_redirect&#039;, &#039;redirect_to_checkout&#039;);\n\nfunction redirect_to_checkout() {\nglobal $woocommerce;\n$checkout_url = $woocommerce-&gt;cart-&gt;get_checkout_url();\nreturn $checkout_url;\n}<\/code><\/pre>\n<p>still to no avail, so im hoping on some help with this as ive hit a dead end!<\/p>\n<p>kind regards<\/p>\n<p>Tommy<\/p>\n","protected":false},"template":"","class_list":["post-1111366","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Redirect to checkout behaving strangely -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Redirect to checkout behaving strangely -\" \/>\n<meta property=\"og:description\" content=\"hello there im trying to bypass the basket when clicking the buy button on a single product view i found someone else having a similar problem here: How to prevent auto redirection to cart after adding item unfortunately there&#8217;s no solution there, so im hoping to re-raise the issue im using the following plugins: Event [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/\" \/>\n<meta property=\"article:modified_time\" content=\"2016-05-21T16:35:04+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/\",\"name\":\"Redirect to checkout behaving strangely -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-05-06T10:53:56+00:00\",\"dateModified\":\"2016-05-21T16:35:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ticket Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Event Tickets Plus\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Redirect to checkout behaving strangely\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Redirect to checkout behaving strangely -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/","og_locale":"en_US","og_type":"article","og_title":"Redirect to checkout behaving strangely -","og_description":"hello there im trying to bypass the basket when clicking the buy button on a single product view i found someone else having a similar problem here: How to prevent auto redirection to cart after adding item unfortunately there&#8217;s no solution there, so im hoping to re-raise the issue im using the following plugins: Event [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/","article_modified_time":"2016-05-21T16:35:04+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/","name":"Redirect to checkout behaving strangely -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-05-06T10:53:56+00:00","dateModified":"2016-05-21T16:35:04+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/redirect-to-checkout-behaving-strangely\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Ticket Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/"},{"@type":"ListItem","position":4,"name":"Event Tickets Plus","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/"},{"@type":"ListItem","position":5,"name":"Redirect to checkout behaving strangely"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1111366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1111366\/revisions"}],"predecessor-version":[{"id":1111580,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1111366\/revisions\/1111580"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1111366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}