Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Convert URL to POST #4284
  • Loading branch information
cklosowski committed Jan 23, 2017
1 parent e85af61 commit 5cc42f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions includes/class-edd-session.php
Expand Up @@ -332,8 +332,10 @@ public function should_start_session() {
* 2. An EDD AJAX request is currently running
* 3. If we are on the checkout page, or any child pages
*/
$current_page = get_queried_object();
if ( isset( $_COOKIE['edd_items_in_cart'] ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX && false !== strpos( $_REQUEST['action'], 'edd_' ) ) || ( is_a( $current_page, 'WP_Page' ) && $current_page->ID == edd_get_option( 'purchase_page' ) ) ) {

$path = ! empty( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '';
$current_page = get_page_by_path( $path );
if ( isset( $_COOKIE['edd_items_in_cart'] ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX && false !== strpos( $_REQUEST['action'], 'edd_' ) ) || ( is_a( $current_page, 'WP_Post' ) && $current_page->ID == edd_get_option( 'purchase_page' ) ) ) {
$start_session = true;
} else {
$start_session = false;
Expand Down

0 comments on commit 5cc42f5

Please sign in to comment.