Server IP : 15.235.198.142 / Your IP : 216.73.216.0 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/kiwigrass_LIVE/wp-content/plugins/woocommerce/assets/js/admin/ |
Upload File : |
/*global woocommerce_admin_meta_boxes, wcTracks */ jQuery( document ).ready( ( $ ) => { 'use strict'; // Stand-in wcTracks.recordEvent in case Tracks is not available (for any reason). window.wcTracks = window.wcTracks || {}; window.wcTracks.recordEvent = window.wcTracks.recordEvent || ( () => {} ); // Handle the "Details" container toggle. $( '.woocommerce-order-attribution-details-toggle' ) .on( 'click', ( e ) => { const $this = $( e.target ).closest( '.woocommerce-order-attribution-details-toggle'); const $container = $this.closest( '.order-attribution-metabox' ) .find( '.woocommerce-order-attribution-details-container' ); let toggle = ''; e.preventDefault(); $container.fadeToggle( 250 ); $this.find( '.toggle-text' ).toggle(); if ( $container.hasClass( 'closed' ) ) { $this.attr( 'aria-expanded', 'true' ); toggle = 'opened'; } else { $this.attr( 'aria-expanded', 'false' ); toggle = 'closed'; } $container.toggleClass( 'closed' ); window.wcTracks.recordEvent( 'order_attribution_details_toggle', { order_id: window.woocommerce_admin_meta_boxes.order_id, details: toggle } ); } ); } );