- UM Woocommerce compatibility;

- make "Shop" page restricted;
This commit is contained in:
nikitozzzzzzz
2017-11-07 16:24:43 +02:00
parent 49630893ce
commit 23cb97cf6c
3 changed files with 20 additions and 4 deletions
+1 -2
View File
@@ -203,7 +203,7 @@ if ( ! class_exists( 'Access' ) ) {
* @return array
*/
function filter_protected_posts( $posts, $query ) {
$filtered_posts = array();
$filtered_posts = array();
//if empty
if ( empty( $posts ) )
@@ -213,7 +213,6 @@ if ( ! class_exists( 'Access' ) ) {
//other filter
foreach ( $posts as $post ) {
$restriction = $this->get_post_privacy_settings( $post );
if ( ! $restriction ) {
$filtered_posts[] = $post;