'', 'columns' => 3, ), $atts ); $plans_id = ! empty( $atts['id'] ) ? explode( ',', $atts['id'] ) : ''; $shortcode_id = ( ! empty( $atts['id'] ) && 1 == count( $plans_id ) ) ? $atts['id'] : ''; $columns = ! empty( $atts['columns'] ) ? $atts['columns'] : 3; $columns = 12 / $columns; $private_plan = ! empty( $shortcode_id ) ? 'EXISTS' : 'NOT EXISTS'; $price_column_width = 100 / $columns . '%'; $listing_type = isset( $_GET['directory_type'] ) ? sanitize_text_field( $_GET['directory_type'] ) : ''; $submission_form_fields = array(); $listing_type = ! empty( $listing_type ) ? $listing_type : default_directory_type(); $term = get_term_by( is_numeric( $listing_type ) ? 'id' : 'slug', $listing_type, 'atbdp_listing_types' ); if ( $listing_type && $term ) { $submission_form = get_term_meta( $term->term_id, 'submission_form_fields', true ); $submission_form_fields = $submission_form['fields']; $submission_form_fields = swbd_pricing_plan__include_additional_submission_fields( array( 'submission_form_fields' => $submission_form_fields ) ); } ?>
>
1 ) { ATBDP_Pricing_Plans()->load_template( 'directory_types', array( 'directory_types' => $types ) ); } } ?>

'atbdp_pricing_plans', 'posts_per_page' => -1, 'status' => 'publish', ); $meta_queries[] = array( 'relation' => 'OR', array( 'key' => '_hide_from_plans', 'compare' => $private_plan, ), array( 'key' => '_hide_from_plans', 'value' => 'yes', 'compare' => '!=', ), ); if ( ! empty( $listing_type ) ) { $meta_queries['directory_type'] = array( 'key' => '_assign_to_directory', 'value' => $term->term_id, 'compare' => '=', ); } $meta_queries = apply_filters( 'atbdp_plan_meta_query', $meta_queries ); $count_meta_queries = count( $meta_queries ); if ( $count_meta_queries ) { $args['meta_query'] = ( $count_meta_queries > 1 ) ? array_merge( array( 'relation' => 'AND' ), $meta_queries ) : $meta_queries; } if ( ! empty( $plans_id ) ) { $args['post__in'] = $plans_id; $args['orderby'] = 'post__in'; } $atbdp_query = new WP_Query( $args ); $has_plan = $atbdp_query->have_posts(); $plans = $atbdp_query->posts; // e_var_dump([ // 'plans_id' => $plans_id, // 'has_plan' => $has_plan, // 'plans' => $plans, // ]); if ( $has_plan && $plans ) { global $post; foreach ( $plans as $key => $value ) { $plan_id = $value->ID; $plan_id = ! empty( $shortcode_id ) ? $shortcode_id : $plan_id; $plan_metas = get_post_meta( $plan_id ); $unl = __( 'Unlimited', 'best-listing' ); $fm_price = atpp_total_price( $plan_id ); $fm_tax = atpp_total_tax( $plan_id ); $tax_placeholder = get_directorist_option( 'tax_placeholder', 'tax' ); $fm_length = isset( $plan_metas['fm_length'][0] ) ? esc_attr( $plan_metas['fm_length'][0] ) : ''; $recurring = isset( $plan_metas['_atpp_recurring'][0] ) ? esc_attr( $plan_metas['_atpp_recurring'][0] ) : ''; $hide_recurring = isset( $plan_metas['hide_recurring'][0] ) ? esc_attr( $plan_metas['hide_recurring'][0] ) : ''; $recurrence_period = isset( $plan_metas['_recurrence_period_term'][0] ) ? esc_attr( $plan_metas['_recurrence_period_term'][0] ) : ''; $recurrence_time = isset( $plan_metas['_recurrence_time'][0] ) ? esc_attr( $plan_metas['_recurrence_time'][0] ) : ''; $fm_length_unl = isset( $plan_metas['fm_length_unl'][0] ) ? esc_attr( $plan_metas['fm_length_unl'][0] ) : ''; $num_regular = isset( $plan_metas['num_regular'][0] ) ? esc_attr( $plan_metas['num_regular'][0] ) : ''; $num_regular_unl = isset( $plan_metas['num_regular_unl'][0] ) ? esc_attr( $plan_metas['num_regular_unl'][0] ) : ''; $num_featured = isset( $plan_metas['num_featured'][0] ) ? esc_attr( $plan_metas['num_featured'][0] ) : ''; $num_featured_unl = isset( $plan_metas['num_featured_unl'][0] ) ? esc_attr( $plan_metas['num_featured_unl'][0] ) : ''; $cf_owner = isset( $plan_metas['cf_owner'][0] ) ? esc_attr( $plan_metas['cf_owner'][0] ) : ''; $fm_cs_review = isset( $plan_metas['fm_cs_review'][0] ) ? esc_attr( $plan_metas['fm_cs_review'][0] ) : ''; $default_pln = isset( $plan_metas['default_pln'][0] ) ? esc_attr( $plan_metas['default_pln'][0] ) : ''; $fm_claim = isset( $plan_metas['_fm_claim'][0] ) ? esc_attr( $plan_metas['_fm_claim'][0] ) : ''; $hide_claim = isset( $plan_metas['_hide_claim'][0] ) ? esc_attr( $plan_metas['_hide_claim'][0] ) : ''; $plan_type = isset( $plan_metas['plan_type'][0] ) ? esc_attr( $plan_metas['plan_type'][0] ) : ''; $hide_featured = isset( $plan_metas['hide_listing_featured'][0] ) ? esc_attr( $plan_metas['hide_listing_featured'][0] ) : ''; // Booking $fm_booking = isset( $plan_metas['_fm_booking'][0] ) ? esc_attr( $plan_metas['_fm_booking'][0] ) : ''; $hide_booking = isset( $plan_metas['_hide_booking'][0] ) ? esc_attr( $plan_metas['_hide_booking'][0] ) : ''; // Live Chat $fm_live_chat = isset( $plan_metas['_fm_live_chat'][0] ) ? esc_attr( $plan_metas['_fm_live_chat'][0] ) : ''; $hide_live_chat = isset( $plan_metas['_hide_live_chat'][0] ) ? esc_attr( $plan_metas['_hide_live_chat'][0] ) : ''; // Mark as Sold $fm_mark_as_sold = isset( $plan_metas['_fm_mark_as_sold'][0] ) ? esc_attr( $plan_metas['_fm_mark_as_sold'][0] ) : ''; $hide_mark_as_sold = isset( $plan_metas['_hide_mark_as_sold'][0] ) ? esc_attr( $plan_metas['_hide_mark_as_sold'][0] ) : ''; if ( is_user_logged_in() ) { $active_plan = subscribed_package_or_PPL_plans( get_current_user_id(), 'completed', $plan_id ); } else { $active_plan = false; } $currency = atbdp_get_payment_currency(); $symbol = atbdp_currency_symbol( $currency ); $c_position = get_directorist_option( 'payment_currency_position' ); $before = ''; $after = ''; ( 'after' == $c_position ) ? $after = $symbol : $before = $symbol; $columns_class = 'directorist-col-md-' . $columns . ' atpp_' . strtolower( $value->post_title ); switch ( $recurrence_period ) { case 'day'; $recurrence_period = ( $fm_length > 1 ) ? $fm_length . ' ' . __( 'days', 'best-listing' ) : __( 'day', 'best-listing' ); break; case 'week'; $recurrence_period = ( $fm_length > 1 ) ? $fm_length . ' ' . __( 'weeks', 'best-listing' ) : __( 'week', 'best-listing' ); break; case 'month'; $recurrence_period = ( $fm_length > 1 ) ? $fm_length . ' ' . __( 'months', 'best-listing' ) : __( 'month', 'best-listing' ); break; case 'year'; $recurrence_period = ( $fm_length > 1 ) ? $fm_length . ' ' . __( 'years', 'best-listing' ) : __( 'year', 'best-listing' ); break; } $price_text = $recurrence_period; if ( $fm_length_unl ) { $price_text = __( 'Lifetime', 'best-listing' ); } do_action( 'atbdp_after_start_plans_loop', $plan_id ); ?>

post_title ); ?> Active', 'best-listing' ) : ''; ?>

Recommended', 'best-listing' ) : ''; ?>

/

  • ' . $unl . '' . __( ' Regular Listings', 'best-listing' ) . '' : $num_regular . __( ' Regular Listings', 'best-listing' ); ?>
  • ' . $unl . '' . __( ' Featured Listings', 'best-listing' ) . '' : $num_featured . __( ' Featured Listings', 'best-listing' ); ?>
  • ID ); ?>
ID ) === 'pay_per_listng' ) { $used_free_plan = apply_filters( 'directorist_free_plan_use', atpp_get_used_free_plan( $value->ID, get_current_user_id() ) ); } $url = apply_filters( 'atbdp_pricing_plan_to_checkout_url', atpp_add_listing_page_link_with_plan( $value->ID, $active_plan ), $value->ID ); ?>
%s

', __( 'There is no Plan available right now. Please contact with administrator.', 'best-listing' ) ); ?>