• I have developed a online ticket purchasing website utilising WordPress and WooCommerce. I have customised the user journey quite a bit but I have not removed any of the action hooks between the cart or the checkout pages. Thereafter a user is redirected to a third party payment system and upon return to the order-received checkout endpoint, I have inserted some custom order processing calls which I’ll include below.

    I read on your FAQ page that the thank you page is necessary for the plugin to work. I checked the template on this page and only two action hooks are defined in the default template. Including these two action hooks into my custom implementaiton doesn’t seem to work as I’m not receiving any data in my Google Analytics account.

    By looking at the code below, could you possibly indicate if the use of this custom implementation is preventing the Google Analytics data to be submitted. ( Apart from the GA functionality, the website interprets the order and payment procedure perfectly. )

    if ( is_wc_endpoint_url( 'order-received' ) ) {
    	$order_id = get_query_var('order-received');
    	$order = new WC_Order( $order_id );
    	$destination = '';
    	if ( $order->has_status( 'failed' ) || $order->has_status( 'pending' ) ) :
    		$destination = '?transaction=failed';
    		else:
    			$order->update_status('completed');
    			do_action( 'woocommerce_thankyou_' . $order->payment_method, $order->id );
    			do_action( 'woocommerce_thankyou', $order->id );
    			$destination = '?transaction=success';
    
    	endif;
    	wp_redirect( site_url() . $destination );
    	exit;
    }

    Thank you

    https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/

Viewing 1 replies (of 1 total)
  • Plugin Author Conversios

    (@tatvic)

    Hi ardinent,

    Can you share with us the store url as well as the view level access of your GA account to analytics2(At)tatvic(Dot)com, to look into the issue further?

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Shop Journey. Action hook enquiry’ is closed to new replies.