# Turn Off Order Attribution Tracking

> Stops WooCommerce's order attribution script from setting tracking cookies and recording the visit source of each order, useful under strict cookie policies.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, privacy, cookies, performance
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-disable-order-attribution/

## Code

```php
add_filter( 'wc_order_attribution_allow_tracking', '__return_false' );

add_action( 'wp_enqueue_scripts', function () {
    wp_dequeue_script( 'wc-order-attribution' );
    wp_dequeue_script( 'sourcebuster-js' );
}, 100 );
```

## Notes

Origin details stop appearing on new orders; the same switch also lives under WooCommerce > Settings > Advanced > Features.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Turn Off Order Attribution Tracking" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
