mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-19 22:54:03 +09:00
Version 1.0.21
This commit is contained in:
@@ -56,11 +56,23 @@
|
||||
function um_access_post_settings() {
|
||||
global $post, $ultimatemember;
|
||||
|
||||
if ( !get_post_type() || !isset($post->ID) ) return;
|
||||
// woo commerce shop ID
|
||||
if( function_exists('is_shop') && is_shop() ) {
|
||||
|
||||
$post_id = get_option('woocommerce_shop_page_id');
|
||||
|
||||
} else {
|
||||
|
||||
if ( !get_post_type() || !isset($post->ID) ) return;
|
||||
|
||||
}
|
||||
|
||||
$args = $ultimatemember->access->get_meta();
|
||||
if ( !isset( $post_id ) )
|
||||
$post_id = $post->ID;
|
||||
|
||||
$args = $ultimatemember->access->get_meta( $post_id );
|
||||
extract($args);
|
||||
|
||||
|
||||
if ( !isset( $args['custom_access_settings'] ) || $args['custom_access_settings'] == 0 ) return;
|
||||
|
||||
$redirect_to = null;
|
||||
|
||||
Reference in New Issue
Block a user