| Server IP : 62.60.133.156 / Your IP : 216.73.217.51 Web Server : LiteSpeed System : Linux linux24.centraldnserver.com 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64 User : mimradmin ( 1166) PHP Version : 7.4.33 Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/cwd/wp-content/plugins/woocommerce-old/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
} );
} );
} );