Last active
March 22, 2019 13:55
-
-
Save Pratik-Jain12/b4f39f934e08b1a1db164dc36f1b18c8 to your computer and use it in GitHub Desktop.
Get User Purchased Download Products
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WP Query Parameters | |
$args = array ( | |
'post_type' => 'download', | |
'post_status' => array( 'publish' ), | |
'order' => 'DESC', | |
'orderby' => 'post_date', | |
'posts_per_page' => 10, | |
'ignore_sticky_posts' => true, | |
'meta_query' => array( | |
array( | |
'key' => '_edd_download_sales', | |
'value' => 0, | |
'compare' => '>', | |
), | |
), | |
); | |
// WP Query | |
$query = new WP_Query( $args ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment