I am hoping I can get some assistance with some issues I'm trying to get the array data from one function to be used in another function.
So in the function that's creating the array data, it looks like this:
function wlp_generate_pdf_and_save( $data, $post_id ){
// Function needing array data
}
function wlp_generate_preview($data, $generateType){
$out_product_brands = array();
if( count($all_posts) > 0 ){
foreach( $all_posts as $s_post )
{
...
$out_product_brands[] = array( 'brand' => vooHelperNew::get_posts_products( $s_post->ID ) );
...
}
}
}
This function "wlp_generate_preview" works perfectly, but it's this $out_product_brands data i need to use in the function (wlp_generate_pdf_and_save) above this one.
Does the order the functions are place change anything?
$all_postsdidn't declared in the function arguments