• Resolved WebWizards

    (@webwizardsdev)


    Hi Ernest,
    I’m looking to integrate your plugin with a plugin of mine that sets product visibility.

    So far I’ve figured out that I can pass an array of visible product IDs in class-asl_helpers.php in the function toQueryArgs() under the “post_in” argument. This seems to work well for my needs.

    But I couldn’t find any filter/hook or a way to do this without modifying your plugin directly.

    Can you please help with this?
    Thanks,
    Stefan

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi Stefan,

    I’m sorry for the late response.

    The asl_query_args hook is what you are looking for.

    add_filter('asl_query_args', 'asl_query_args_postin', 10, 1);
    function asl_query_args_postin($args) {
            $args['post_in'] = is_array($args['post_in']) ? $args['post_in'] : array();
    	$args['post_in'] = array_merge($args['post_in'], array(1,2,3));
    	return $args;
    }

    Best,
    Ernest M

    Thread Starter WebWizards

    (@webwizardsdev)

    Thanks a lot Ernest,

    This seems to work very well. I’ve added this compatibility to our B2BKing plugin and it will be live with the next update release.

    Cheers,

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Product Visibility Integration’ is closed to new replies.