Hook Request in getMembershipLevels
-
Add a filter to modify the products that are listed in the WooCommerce tab that is added by this plugin.
My use of this, is to add category restrictions to what is shown.
Code suggested:
Line 74:$levelData = get_posts(apply_filters('wpcw_woo_product_args',$args));Current:
Line 74:$levelData = get_posts($args);Example use:
add_filter('wpcw_woo_product_args', 'filter_wpcw_woo_product_args',15); function filter_wpcw_woo_product_args($args) { //Limit WP Courseware to just "Courses" categorie $args['product_cat'] = 'courses'; //Send args back return $args; };https://ww.wp.xz.cn/plugins/woo-commerce-addon-for-wp-courseware/
The topic ‘Hook Request in getMembershipLevels’ is closed to new replies.