PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/photostockmall.online/wp-content/plugins/edd-commissions/includes/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //home/trave494/photostockmall.online/wp-content/plugins/edd-commissions/includes/upgrades.php

<?php

/**
 * Upgrade all commissions with user ID meta
 *
 * Prior to 1.3 it wasn't possible to query commissions by user ID (dumb)
 *
 * @access      private
 * @since       1.3
 * @return      void
*/

function eddc_upgrade_user_ids() {

	if( get_option( 'eddc_upgraded_user_ids' ) )
		return; // don't perform the upgrade if we have already done it

	$args = array(
		'post_type' => 'edd_commission',
		'posts_per_page' => -1
	);

	$commissions = get_posts( $args );

	if( $commissions ) {
		foreach( $commissions as $commission ) {
			$info = maybe_unserialize( get_post_meta( $commission->ID, '_edd_commission_info', true ) );

			update_post_meta( $commission->ID, '_user_id', $info['user_id'] );
		}
		add_option( 'eddc_upgraded_user_ids', '1' );
	}

}
add_action( 'admin_init', 'eddc_upgrade_user_ids' );