Skip to content

Instantly share code, notes, and snippets.

@warrendholmes
Created July 16, 2014 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save warrendholmes/296fd0fd92788ad7e3ef to your computer and use it in GitHub Desktop.
Save warrendholmes/296fd0fd92788ad7e3ef to your computer and use it in GitHub Desktop.
$args = array(
‘posts_per_page’ => 1,
‘post_type’ => ‘product’,
‘post_status’ => array( ‘publish’, ‘trash’, ‘draft’, ‘pending’ ),
‘meta_query’ => array(
array(
‘key’ => ‘_spin_id’,
‘value’ => (string) trim($p->SpinId),
) )
);
$posts = get_posts( $args );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment