0; if ( $aieo_pr_pid <= 0 && isset( $block ) && is_object( $block ) && ! empty( $block->context['postId'] ) ) { $aieo_pr_ctx = (int) $block->context['postId']; if ( $aieo_pr_ctx > 0 && 'product' === get_post_type( $aieo_pr_ctx ) ) { $aieo_pr_pid = $aieo_pr_ctx; } } if ( $aieo_pr_pid <= 0 && function_exists( 'is_singular' ) && is_singular( 'product' ) ) { $aieo_pr_pid = (int) get_queried_object_id(); } $aieo_pr_html = AIEO_Product_Request_Form::render( array( 'product_id' => $aieo_pr_pid, 'type' => isset( $attributes['type'] ) ? (string) $attributes['type'] : '', 'layout' => isset( $attributes['layout'] ) ? (string) $attributes['layout'] : 'compact', 'title' => isset( $attributes['title'] ) ? (string) $attributes['title'] : '', 'button' => isset( $attributes['button'] ) ? (string) $attributes['button'] : '', 'fields' => isset( $attributes['fields'] ) ? (string) $attributes['fields'] : '', 'check_rule' => ! $aieo_pr_explicit, ) ); if ( '' === $aieo_pr_html ) { return; } $aieo_pr_wrapper = get_block_wrapper_attributes( array( 'class' => 'aieo-product-request-block' ) ); echo '