PageSourceSearch

https://www.silex.co.uk/wp-content/plugins/woocommerce/assets/js/f…/wp-consent-api-integration.js?ver=11.1.2

js silex.co.uk collected 2026-10-04 13:29:46 UTC 727 bytes, 19 lines download raw bytes

1( function () {
2	'use strict';
3
4	// Set order attribution on consent change.
5	document.addEventListener( 'wp_listen_for_consent_change', ( e ) => {
6		const changedConsentCategory = e.detail;
7		for ( const key in changedConsentCategory ) {
8			if ( changedConsentCategory.hasOwnProperty( key ) && key === window.wc_order_attribution.params.consentCategory ) {
9				window.wc_order_attribution.setOrderTracking( changedConsentCategory[ key ] === 'allow' );
10		}
11		}
12	} );
13
14	// Set order attribution as soon as consent type is defined.
15	document.addEventListener( 'wp_consent_type_defined', () => {
16		window.wc_order_attribution.setOrderTracking( wp_has_consent( window.wc_order_attribution.params.consentCategory ) );
17	} );
18}() );
19

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.