<?php

/**
 * @file
 * Search data html builder file.
 * @package     bspscw
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit( 'Sorry!' );
}

/*
 * NOTE: this template is `require`d from
 * BSD_Split_Pay_Stripe_Connect_Woo\Inc\Admin\BSD_SCA::product_search_data(),
 * so `$this` here resolves to that class instance at runtime. PHPStan's
 * "Variable $this might not be defined" finding in this file is suppressed
 * via an analyser-side ignoreErrors entry in phpstan.neon (path scoped).
 */
global $post, $bsd_sca, $wpdb;

// 3.7.5 static-analysis: pre-initialise variables that PHPStan reports as
// possibly-undefined when only assigned in conditional branches further down.
$cat_products_id = array();
$product_query   = null;
$bsppcak         = '';
$total_text      = '';
// 3.7.5: filter the bulk-editor vendor dropdowns to the store's active Stripe
// mode (plus legacy/undetected) so only same-mode accounts are selectable.
// (Saved values still display in the per-row selected_account_id_wrapper text,
// and the pre-emptive transfer guard is the authoritative money-path check.)
$spp_active_mode = $bsd_sca->active_stripe_mode();
$get_accounts = $bsd_sca->get_stored_accounts( $spp_active_mode );

$level        = 'bulk_editor';
$get_accounts = apply_filters( 'spp_get_stored_accounts', $get_accounts, $level );

$page      = 1;
$html      = $search = '';
$tax_query    = $categories = $pro_query = $products_id = $product_attribute_query = $pv_query = $get_tax_products_id = array();
$only_matched_child_ids = array();
$pages     = array();
$all_variations = false;
$and_condition_group = array();

if(isset($_POST["all_variations"]) && $_POST["all_variations"] == "true"){
	$all_variations = true;
}
if ( isset( $_POST['filter_type'] ) && ! empty( $_POST['filter_type'] ) ) {
	$filter_contain = wp_unslash( $_POST['filter_contain'] );
	$filter_value   = wp_unslash( $_POST['filter_value'] );

	foreach ( wp_unslash( $_POST['filter_type'] ) as $key => $value ) {
		if ( $value == 'categories' && isset( $filter_contain[ $key ] ) && isset( $filter_value[ $key ] ) ) { // categories
			$categories[ $key ]['condition'] = str_replace(array( 'is_any_of', 'is_none_of' ), array(
				'IN',
				'NOT IN',
			), $filter_contain[ $key ]);
			$categories[ $key ]['value']     = $filter_value[ $key ];
		} elseif ( $value == 'post_title' ) { // product
			$pro_query[ $key ]['title']['condition'] = $filter_contain[ $key ];
			$pro_query[ $key ]['title']['value']     = $filter_value[ $key ];
		} elseif ( $value == 'pa' ) {
			$attribute_query = array();
			$product_attributes = wc_get_attribute_taxonomies();
			if ( ! empty( $product_attributes ) ) {
				$attribute_query[ $key ]['pa']['condition'] = $filter_contain[ $key ];
				$attribute_query[ $key ]['pa']['value']     = $filter_value[ $key ];
				if ( empty( $products_id ) ) {
					$products_id = $this->get_product_from_attribute_search( $attribute_query, $all_variations );
					$only_matched_child_ids = $products_id;
					if($all_variations == false){
						if(isset($products_id[0])){
							$products_id = array_merge($products_id[0], array_keys($products_id));
						}else{
							$products_id = array_keys($products_id);	
						}
				}
				} else {
					$iterate_products_id = $this->get_product_from_attribute_search( $attribute_query, $all_variations );

					$only_matched_child_ids = $iterate_products_id;
					if($all_variations == false){
						if(isset($iterate_products_id[0])){
							$products_id = array_merge($iterate_products_id[0], array_keys($iterate_products_id));
				} else {
							$products_id = array_keys($iterate_products_id);
						}
					}
					$products_id         = array_merge( $products_id, $iterate_products_id );
					
				}
			}
		} else { // sku
			$pro_query[ $key ]['sku']['condition'] = $filter_contain[ $key ];
			$pro_query[ $key ]['sku']['value']     = $filter_value[ $key ];
		}
	}
}


if ( ! empty( $categories ) ) {
	$and_condition_group[] = 'categories';
	foreach ( $categories as $key => $cat ) {
		/*
		$tax_query[ $key ]['relation'] = 'AND';
		$tax_query[ $key ][]           = array(
			'taxonomy' => 'product_cat',
			'field'    => 'term_taxonomy_id ',
			'terms'    => $cat['value'],
			'operator' => $cat['condition'],
		); */

		$temp_get_tax_products_id = $this->get_taxonomy_product_ids( $cat );
		
		$get_tax_products_id = array_merge( $get_tax_products_id, $temp_get_tax_products_id );
	}
}

if ( isset( $_POST['paged'] ) && ! empty( $_POST['paged'] ) ) {
	$page = wp_unslash( $_POST['paged'] );
}


$product_args = array(
	'post_type'      => array( 'product', 'product_variation', 'fluent-products' ),
	'post_status'    => 'publish',
	'posts_per_page' => 200,
	'paged'          => $page,
	'order'          => 'DESC',
	'orderby'        => 'ID',
);


if ( ! empty( $pro_query ) ) {
	
	if ( empty( $products_id ) ) {
		
		$products_id = $this->get_product_title_sku_result( $pro_query, $get_tax_products_id, $all_variations );
		$and_condition_group[]  = 'title_sku';
		$only_matched_child_ids = $products_id;
		if($all_variations == false){
			if(isset($products_id[0])){
				$products_id = array_merge($products_id[0], array_keys($products_id));
	} else {
				$products_id = array_keys($products_id);	
			}
		}
	} else {
		$iterate_products_id = $this->get_product_title_sku_result( $pro_query, $get_tax_products_id, $all_variations );
		$and_condition_group[]  = 'title_sku';
		$only_matched_child_ids = $iterate_products_id;
		if($all_variations == false){
			if(isset($iterate_products_id[0])){
				$products_id = array_merge($iterate_products_id[0], array_keys($iterate_products_id));
			}else{
				$products_id = array_keys($iterate_products_id);
			}
		}
		
		$products_id         = array_merge( $products_id, $iterate_products_id );
	}
}




if(!empty($get_tax_products_id)){

	if ( ! empty( $products_id ) ) {
		/*
		$temp_intersect_product_ids = array();
		foreach($get_tax_products_id as $product_ids_key){
			if(in_array($product_ids_key, $products_id)){
				$temp_intersect_product_ids[] = $product_ids_key;
			}
		} */

		$cat_products_id = array_intersect($get_tax_products_id, $products_id);
		// $products_id = array_merge( $products_id, $temp_intersect_product_ids );
	}else{

		$cat_products_id = array_merge( $products_id, $get_tax_products_id );

	}
	// $products_id = array_merge( $products_id, $get_tax_products_id );
	// $cat_products_id = array_intersect($get_tax_products_id, $products_id);

}


if ( in_array( 'categories', $and_condition_group ) && in_array( 'title_sku', $and_condition_group ) && ! empty( $get_tax_products_id ) && ! empty( $products_id ) ) {
	$products_id = $cat_products_id;
} elseif ( in_array( 'categories', $and_condition_group ) && in_array( 'title_sku', $and_condition_group ) ) {
	if(empty($get_tax_products_id) || empty( $products_id )){
		$products_id = array();
	}
} elseif ( in_array( 'categories', $and_condition_group ) && ! in_array( 'title_sku', $and_condition_group ) ) {
	$products_id = $cat_products_id;
		}

if ( ! empty( $products_id ) ) {
	$products_id = array_unique($products_id);
	
	
	$product_args['post__in'] = $products_id;
}


// 3.7.5 static-analysis: $tax_query population is commented out above
// (lines ~86-91), so it can never be non-empty here. The two `! empty( $tax_query )`
// checks (here and in the elseif below) and the assignment were dead. Reinstate
// if the commented-out tax_query build is ever re-enabled.

if ( isset( $_POST['search_type'] ) && $_POST['search_type'] == 'show-all' ) {
	$product_query = new WP_Query( $product_args );
} elseif ( ! empty( $products_id ) ) {
	$product_query = new WP_Query( $product_args );
}

if ( $product_query && $product_query->have_posts() ) {
	ob_start();
?>
	<form name="bulk_editor" id="bulk-editor-save" method="post" action="" onkeydown="if(event.keyCode === 13) { return false; }">
		<input type="hidden" name="action" value="save_product_bulk_edit" />
		<input type="hidden" name="security" value="<?php echo esc_attr( wp_create_nonce( 'ajax-security' ) ); ?>" />
		<div class="our-pro-bar">

			<button class="n-btn save-bulk-edit" type="submit"><?php echo esc_html__( 'Save Changes', 'bsd-split-pay-stripe-connect-woo' ); ?></button>
			<?php
			$total_pages = $product_query->max_num_pages;
			$big         = 999999999; // need an unlikely integer
			$total_text       = '';
			$total_variations = 0;

			$total_products = 0;
			if ( $total_pages > 1 ) {
				$current_page = max( 1, $page );

				$pages = paginate_links(array(
					'base'      => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
					'format'    => '?paged=%#%',
					'current'   => $current_page,
					'total'     => $total_pages,
					'prev_text' => esc_html__( '«', 'bsd-split-pay-stripe-connect-woo' ),
					'next_text' => esc_html__( '»', 'bsd-split-pay-stripe-connect-woo' ),
					'type'      => 'array',
				));
				if ( is_array( $pages ) ) {
					$paged = ( get_query_var( 'paged' ) == 0 ) ? 1 : get_query_var( 'paged' );
					echo '<ul class="pagination">';
					foreach ( $pages as $page ) {
						echo wp_kses_post( "<li>$page</li>" );
					}
					echo '</ul>';
				}
			}
			$total_products = $product_query->found_posts;
			?>
			<div class="result-coutn"><?php echo esc_html( $total_products . ' records found' ); ?></div>
		</div>
		<div class="our-pro-table__cover">
			<div class="loader-block result-loader">
				<div class="loader-pro first-bar"></div>
				<div class="loader-pro second-bar"></div>
				<div class="loader-pro third-bar"></div>
			</div>
			<table class="our-pro-table" cellspacing="0" cellpadding="0">
				<tr>
					<th class="source-th" style="width:40px;text-align:center;"><?php echo esc_html__( 'Source', 'bsd-split-pay-stripe-connect-woo' ); ?></th>
					<th class="product-th"><?php echo esc_html__( 'Product', 'bsd-split-pay-stripe-connect-woo' ); ?></th>
					<th class="attribute-th"><?php echo esc_html__( 'Variation / Attribute', 'bsd-split-pay-stripe-connect-woo' ); ?></th>
					<th class="connected-th"> 
						<a href="javascript:void(0);" class="edit-item connect_stripe_account_modal_open">
							<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit-white.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
						</a>
						<span> 
							<?php echo esc_html__( 'Connected Stripe Account', 'bsd-split-pay-stripe-connect-woo' ); ?>
						</span> 
						
					</th>
					<th class="transfer-th">
						<a href="javascript:void(0);" class="edit-item transfer_type_modal_open">
							<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit-white.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
						</a>
						<span>
							<?php echo esc_html__( 'Transfer Type', 'bsd-split-pay-stripe-connect-woo' ); ?>
						</span>
						
					</th>
					<th class="value-th">
						<a href="javascript:void(0);" class="edit-item value_modal_open">
							<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit-white.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
						</a>
						<span>
							<?php echo esc_html__( 'Value', 'bsd-split-pay-stripe-connect-woo' ); ?>
						</span>
					</th>
					<th class="shipping-th">
						<a href="javascript:void(0);" class="edit-item shipping_transfer_type_modal_open">
							<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit-white.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
						</a>
						<span>
							<?php echo esc_html__( 'Shipping Transfer Type', 'bsd-split-pay-stripe-connect-woo' ); ?>
						</span>
					</th>
					<th class="value2-th">
						<a href="javascript:void(0);" class="edit-item shipping_transfer_value_modal_open">
							<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit-white.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
						</a>
						<span>
							<?php echo esc_html__( 'Value', 'bsd-split-pay-stripe-connect-woo' ); ?>
						</span>
					</th>
					<th class="category-th"><?php echo esc_html__( 'Category', 'bsd-split-pay-stripe-connect-woo' ); ?></th>
					<th class="sku-th"><?php echo esc_html__( 'SKU', 'bsd-split-pay-stripe-connect-woo' ); ?></th>
				</tr>
				<?php


				$odd_even = 1;
				// @phpstan-ignore-next-line — WP_Query::the_post() advances pointer; have_posts() flips on exhaustion.
				while ( $product_query->have_posts() ) :
					$product_query->the_post();

					$post_id      = get_the_ID();
					$source_label = ( get_post_type( $post_id ) === 'fluent-products' ) ? 'FC' : 'WC';
					$product      = wc_get_product( $post_id );

					if ( ! $product && get_post_type( $post_id ) === 'fluent-products' ) {
						// FC product — read settings from fct_product_meta, fall back to postmeta
						$fc_meta_raw = $wpdb->get_var( $wpdb->prepare(
							"SELECT meta_value FROM {$wpdb->prefix}fct_product_meta WHERE object_id = %d AND meta_key = 'split_pay_connect' LIMIT 1",
							$post_id
						) );
						$fc_meta = $fc_meta_raw ? json_decode( $fc_meta_raw, true ) : null;

						$fc_acct     = '';
						$fc_type     = '';
						$fc_pct      = '';
						$fc_amt      = '';
						$fc_ship_type = '';
						$fc_ship_pct = '';
						$fc_ship_amt = '';
						if ( is_array( $fc_meta ) ) {
							$fc_acct     = $fc_meta['connected_account'] ?? '';
							$fc_type     = $fc_meta['transfer_type'] ?? '';
							$fc_pct      = $fc_meta['transfer_percentage'] ?? '';
							$fc_amt      = $fc_meta['transfer_amount'] ?? '';
							$fc_ship_type = $fc_meta['shipping_transfer_type'] ?? '';
							$fc_ship_pct = $fc_meta['shipping_transfer_percentage'] ?? '';
							$fc_ship_amt = $fc_meta['shipping_transfer_amount'] ?? '';
						}
						if ( empty( $fc_acct ) ) {
							$pm_accts = get_post_meta( $post_id, '_bsd_spscwt_product_connected_account', true );
							if ( is_array( $pm_accts ) && ! empty( $pm_accts[0] ) ) {
								$fc_acct = $pm_accts[0];
								$pm_types = get_post_meta( $post_id, '_bsd_spscwt_product_type', true );
								$pm_pcts  = get_post_meta( $post_id, '_stripe_connect_split_pay_transfer_percentage', true );
								$pm_amts  = get_post_meta( $post_id, '_bsd_spscwt_product_amount', true );
								$fc_type  = is_array( $pm_types ) ? ( $pm_types[0] ?? '' ) : '';
								$fc_pct   = is_array( $pm_pcts ) ? ( $pm_pcts[0] ?? '' ) : '';
								$fc_amt   = is_array( $pm_amts ) ? ( $pm_amts[0] ?? '' ) : '';
							}
						}

						$fc_variations = $wpdb->get_results( $wpdb->prepare(
							"SELECT variation_title, ROUND(item_price/100, 2) as price FROM {$wpdb->prefix}fct_product_variations WHERE post_id = %d ORDER BY id",
							$post_id
						), ARRAY_A );
						$fc_var_count = count( $fc_variations );
						$fc_var_label = $fc_var_count <= 1 ? 'Single' : $fc_var_count . ' variations';

						$fc_edit_url = admin_url( 'admin.php?page=fluent-cart#/products/' . $post_id . '/edit' );

						$row_bg   = ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark';
						$row_cls  = ( $odd_even % 2 == 1 ) ? 'odd' : 'even';
						$fc_value = ( $fc_type === 'amount' && $fc_amt !== '' ) ? $fc_amt : $fc_pct;
						$fc_ship_value = ( $fc_ship_type === 'amount' && $fc_ship_amt !== '' ) ? $fc_ship_amt : $fc_ship_pct;
					?>
						<input type="hidden" name="product_type[<?php echo (int) $post_id; ?>]" value="fc_product" />
						<tr class="simple-product-tr border-bottom-1 <?php echo esc_attr( $row_cls ); ?>">
							<td class="<?php echo esc_attr( $row_bg ); ?> text-center"><?php echo esc_html( $source_label ); ?></td>
							<td class="<?php echo esc_attr( $row_bg ); ?> td-right-border">
								<a href="<?php echo esc_url( $fc_edit_url ); ?>" target="_blank" rel="noopener noreferrer"><?php echo esc_html( get_the_title() ); ?></a>
							</td>
							<td class="<?php echo esc_attr( $row_bg ); ?> text-center"><?php echo esc_html( $fc_var_label ); ?></td>
							<td class="select_account_td_wrapper edit-item-parent">
								<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
								<div class="edit-form">
									<select name="_bsd_spscwt_product_connected_account[<?php echo (int) $post_id; ?>][0]" class="sspscwsca_select">
										<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
										<?php if ( ! empty( $get_accounts ) ) : foreach ( $get_accounts as $gak ) : ?>
											<option value="<?php echo esc_attr( trim( $gak['bsd_account_id'] ) ); ?>" <?php selected( trim( $gak['bsd_account_id'] ), $fc_acct ); ?>><?php echo esc_html( empty( $gak['bsd_account_name'] ) ? $gak['bsd_account_id'] : $gak['bsd_account_name'] ); ?></option>
										<?php endforeach; endif; ?>
									</select>
									<div class="edit-form-btns select_account_btns">
										<button class="edit-form-ok-btn" type="button"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="Submit" /></button>
										<button class="edit-form-cancle-btn" type="button"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="Cancel" /></button>
									</div>
								</div>
								<div class="selected_account_id_wrapper"><?php echo esc_html( $fc_acct ); ?></div>
							</td>
							<td class="prod_selected_tt_td_wrapper edit-item-parent">
								<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
								<div class="edit-form">
									<select name="_bsd_spscwt_product_type[<?php echo (int) $post_id; ?>][0]" class="bsd_spscwt_type">
										<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
										<option value="percentage" <?php selected( $fc_type, 'percentage' ); ?>><?php echo esc_html__( 'Percentage', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
										<option value="amount" <?php selected( $fc_type, 'amount' ); ?>><?php echo esc_html__( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
									</select>
									<div class="edit-form-btns">
										<button class="edit-form-ok-btn" type="button"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="Submit" /></button>
										<button class="edit-form-cancle-btn" type="button"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="Cancel" /></button>
									</div>
								</div>
								<div class="prod_selected_tt"><?php echo esc_html( $fc_type ); ?></div>
							</td>
							<td class="prod_transfer_type_value_td_wrapper edit-item-parent">
								<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
								<div class="edit-form">
									<div class="field_percentage <?php echo ( $fc_type !== 'amount' ) ? '' : 'hide'; ?>">
										<input type="number" name="_stripe_connect_split_pay_transfer_percentage[<?php echo (int) $post_id; ?>][0]" value="<?php echo esc_attr( $fc_pct ); ?>" min="0" max="100" step="0.01" placeholder="%" />
									</div>
									<div class="field_amount <?php echo ( $fc_type === 'amount' ) ? '' : 'hide'; ?>">
										<input type="number" name="_bsd_spscwt_product_amount[<?php echo (int) $post_id; ?>][0]" value="<?php echo esc_attr( $fc_amt ); ?>" min="0" step="0.01" placeholder="$" />
									</div>
									<div class="edit-form-btns">
										<button class="edit-form-ok-btn" type="button"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="Submit" /></button>
										<button class="edit-form-cancle-btn" type="button"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="Cancel" /></button>
									</div>
								</div>
								<div class="prod_transfer_type_value"><?php echo esc_html( $fc_value ); ?></div>
							</td>
							<td class="prod_shipping_transfer_type_td_wrapper edit-item-parent">
								<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
								<div class="edit-form">
									<select name="bsd_spscwt_shipping_type[<?php echo (int) $post_id; ?>][0]" class="bsd_spscwt_shipping_type">
										<option value=""><?php esc_attr_e( 'None', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
										<option value="percentage" <?php selected( $fc_ship_type, 'percentage' ); ?>><?php echo esc_html__( 'Percentage', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
										<option value="amount" <?php selected( $fc_ship_type, 'amount' ); ?>><?php echo esc_html__( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
									</select>
									<div class="edit-form-btns">
										<button class="edit-form-ok-btn" type="button"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="Submit" /></button>
										<button class="edit-form-cancle-btn" type="button"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="Cancel" /></button>
									</div>
								</div>
								<div class="prod_shipping_transfer_type"><?php echo esc_html( $fc_ship_type ); ?></div>
							</td>
							<td class="prod_shipping_value_td_wrapper edit-item-parent">
								<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
								<div class="edit-form">
									<div class="field_percentage <?php echo ( $fc_ship_type !== 'amount' ) ? '' : 'hide'; ?>">
										<input type="number" name="bsd_prod_shipping_percentage[<?php echo (int) $post_id; ?>][0]" value="<?php echo esc_attr( $fc_ship_pct ); ?>" min="0" max="100" step="0.01" placeholder="%" />
									</div>
									<div class="field_amount <?php echo ( $fc_ship_type === 'amount' ) ? '' : 'hide'; ?>">
										<input type="number" name="_bsd_spscwt_shipping_amount[<?php echo (int) $post_id; ?>][0]" value="<?php echo esc_attr( $fc_ship_amt ); ?>" min="0" step="0.01" placeholder="$" />
									</div>
									<div class="edit-form-btns">
										<button class="edit-form-ok-btn" type="button"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="Submit" /></button>
										<button class="edit-form-cancle-btn" type="button"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="Cancel" /></button>
									</div>
								</div>
								<div class="prod_shipping_value"><?php echo esc_html( $fc_ship_value ); ?></div>
							</td>
							<td class="<?php echo esc_attr( $row_bg ); ?>">&mdash;</td>
							<td class="<?php echo esc_attr( $row_bg ); ?>">&mdash;</td>
						</tr>
					<?php
						$odd_even++;
						continue;
					} elseif ( ! $product ) {
						$odd_even++;
						continue;
					}

					$cat_name = array();
					$prod_cat = get_the_terms( $post_id, 'product_cat' );
					if ( is_array( $prod_cat ) ) {
						foreach ( $prod_cat as $cat ) {
							$cat_name[] = $cat->name;
						}
					}
					$sku          = $product->get_sku();
					$product_type = $product->get_type();

					if ( $product_type == 'simple' ) {

						$_bsd_spscwt_product_connected_account = get_post_meta( $post_id, '_bsd_spscwt_product_connected_account', true );

						if ( ! empty( $_bsd_spscwt_product_connected_account ) ) {
							$_bsd_spscwt_product_type                      = get_post_meta( $post_id, '_bsd_spscwt_product_type', true );
							$_stripe_connect_split_pay_transfer_percentage = get_post_meta( $post_id, '_stripe_connect_split_pay_transfer_percentage', true );
							$_bsd_spscwt_product_amount                    = get_post_meta( $post_id, '_bsd_spscwt_product_amount', true );

							$_bsd_spscwt_shipping_type     = get_post_meta( $post_id, '_bsd_spscwt_shipping_type', true );
							$_bsd_prod_shipping_percentage = get_post_meta( $post_id, '_bsd_prod_shipping_percentage', true );
							$_bsd_prod_shipping_amount     = get_post_meta( $post_id, '_bsd_spscwt_shipping_amount', true );
							$last_row_counter              = 1;
							$total_rows_counter            = count( $_bsd_spscwt_product_connected_account );
							foreach ( $_bsd_spscwt_product_connected_account as $bsppcak => $bsppcav ) {
				?>
								<input type="hidden" name="product_type[<?php echo (int) $post_id; ?>]" value="<?php echo esc_attr( $product_type ); ?>" />

								<?php
								if ( $last_row_counter == 1 ) {
								?>
									<tr odd_even="<?php echo (int) $odd_even; ?>" class="simple-product-tr <?php echo ( $total_rows_counter == $last_row_counter ) ? 'border-bottom-1' : ''; ?> <?php echo ( $odd_even % 2 == 1 ) ? 'odd ' : 'even'; ?>" >
										<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> text-center"><?php echo esc_html( $source_label ); ?></td>
										<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> td-right-border variable-td-border-bottom" rowspan="<?php echo (int) $total_rows_counter; ?>">
											<a href="<?php echo esc_url( get_edit_post_link( $post_id ) ); ?>" target="_blank" rel="noopener noreferrer">
												<?php echo esc_html( get_the_title() ); ?>
											</a>
										</td>
										<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> text-center variable-td-border-bottom" rowspan="<?php echo (int) $total_rows_counter; ?>"><?php echo esc_html__( 'Simple product', 'bsd-split-pay-stripe-connect-woo' ); ?></td>
										<td class="select_account_td_wrapper edit-item-parent">
											<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
											<div class="edit-form">
												<select name="_bsd_spscwt_product_connected_account[<?php echo (int) $post_id; ?>][<?php echo (int) $bsppcak; ?>]" id="sspscwsca_select_<?php echo (int) $bsppcak; ?>" class="sspscwsca_select">
													<?php

													if ( ! empty( $get_accounts ) ) {
													?>
														<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
														<?php
														foreach ( $get_accounts as $gak ) {
														?>
															<option value="<?php echo esc_attr( trim($gak['bsd_account_id']) ); ?>" <?php echo ( trim($gak['bsd_account_id']) == $bsppcav ) ? "selected='selected'" : ''; ?>><?php echo esc_html( empty( $gak['bsd_account_name'] ) ? $gak['bsd_account_id'] : $gak['bsd_account_name'] ); ?></option>
															<?php
														}
													}
													?>

												</select>


												<div class="edit-form-btns select_account_btns">
													<button class="edit-form-ok-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
													<button class="edit-form-cancle-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
												</div>
											</div>
											<div class="selected_account_id_wrapper"><?php echo esc_html( $bsppcav ); ?></div>
										</td>

										<td class="prod_selected_tt_td_wrapper edit-item-parent">
											<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
											<div class="edit-form">
												<select name="_bsd_spscwt_product_type[<?php echo (int) $post_id; ?>][<?php echo (int) $bsppcak; ?>]" class="bsd_spscwt_type" id="bsd_spscwt_type_<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>">
													<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
													<option value="percentage" <?php echo ( 'percentage' == $_bsd_spscwt_product_type[ $bsppcak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Percentage', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
													<option value="amount" <?php echo ( 'amount' == $_bsd_spscwt_product_type[ $bsppcak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
												</select>
												<div class="edit-form-btns prod_selected_tt_btns">
													<button class="edit-form-ok-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
													<button class="edit-form-cancle-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
												</div>
											</div>
											<div class="selecte_tt_wrapper">
												<?php
												if ( $_bsd_spscwt_product_type[ $bsppcak ] == 'percentage' ) {
													esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
												} elseif ( $_bsd_spscwt_product_type[ $bsppcak ] == 'amount' ) {
													esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
												}
												?>
											</div>
										</td>
										<td class="prod_tv_td_wrapper edit-item-parent">
											<a href="javascript:void(0);" class="edit-item selected_tt_value_wrapper" data-connected_account_index="<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
											<div class="edit-form">
												<input type='number' min='0' max="100" step=".01" id='bsd_split_pay_stripe_connect_woo_transfer_percentage_<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>' name='_stripe_connect_split_pay_transfer_percentage[<?php echo (int) $post_id; ?>][<?php echo (int) $bsppcak; ?>]' value="<?php echo esc_attr( $_stripe_connect_split_pay_transfer_percentage[ $bsppcak ] ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_input <?php echo ( 'amount' == $_bsd_spscwt_product_type[ $bsppcak ] ) ? 'bsd_hidden' : ''; ?>" />
												<input type='number' min='0' step=".01" id='bsd_spscwt_amount_<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>' name='_bsd_spscwt_product_amount[<?php echo (int) $post_id; ?>][<?php echo (int) $bsppcak; ?>]' value="<?php echo esc_attr( $_bsd_spscwt_product_amount[ $bsppcak ] ); ?>" placeholder="e.g. 20" class="bsd_spscwt_amount <?php echo ( empty( $_bsd_spscwt_product_type[ $bsppcak ] ) || 'percentage' == $_bsd_spscwt_product_type[ $bsppcak ] ) ? 'bsd_hidden' : ''; ?>" />
												<div class="edit-form-btns prod_tv_btns">
													<button class="edit-form-ok-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
													<button class="edit-form-cancle-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
												</div>
											</div>
											<div class="selected_transfer_value_wrapper">
												<?php
												if ( $_bsd_spscwt_product_type[ $bsppcak ] == 'percentage' ) {
													echo esc_html( $_stripe_connect_split_pay_transfer_percentage[ $bsppcak ] );
												} else {
													echo esc_html( $_bsd_spscwt_product_amount[ $bsppcak ] );
												}
												?>
											</div>
										</td>
										<td class="prod_selected_st_td_wrapper edit-item-parent">

											<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
											<div class="edit-form">
												<select name="bsd_spscwt_shipping_type[<?php echo (int) $post_id; ?>][<?php echo (int) $bsppcak; ?>]" class="bsd_spscwt_shipping_type" id="bsd_spscwt_shipping_type_<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>">
													<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
													<option value="percentage" <?php echo ( isset( $_bsd_spscwt_shipping_type[ $bsppcak ] ) && 'percentage' == $_bsd_spscwt_shipping_type[ $bsppcak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Percentage' ); ?></option>
													<option value="amount" <?php echo ( isset( $_bsd_spscwt_shipping_type[ $bsppcak ] ) && 'amount' == $_bsd_spscwt_shipping_type[ $bsppcak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Fixed Amount' ); ?></option>
												</select>

												<div class="edit-form-btns prod_selected_st_btns">
													<button class="edit-form-ok-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
													<button class="edit-form-cancle-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
												</div>
											</div>

											<div class="selected_shipping_type_wrapper">
												<?php
												if ( isset( $_bsd_spscwt_shipping_type[ $bsppcak ] ) && $_bsd_spscwt_shipping_type[ $bsppcak ] == 'percentage' ) {
													esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
												} elseif ( isset( $_bsd_spscwt_shipping_type[ $bsppcak ] ) && $_bsd_spscwt_shipping_type[ $bsppcak ] == 'amount' ) {
													esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
												}
												?>
											</div>
										</td>
										<td class="prod_stv_td_wrapper edit-item-parent">

											<a href="javascript:void(0);" class="edit-item selected_stv_value_wrapper" data-connected_account_index="<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
											<div class="edit-form">
												<input type='number' min='0' max="100" step=".01" id='bsd_prod_shipping_percentage_<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>' name='bsd_prod_shipping_percentage[<?php echo (int) $post_id; ?>][<?php echo (int) $bsppcak; ?>]' value="<?php echo esc_attr( ( isset( $_bsd_prod_shipping_percentage[ $bsppcak ] ) ) ? $_bsd_prod_shipping_percentage[ $bsppcak ] : "" ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_shipping_input <?php echo ( isset( $_bsd_spscwt_shipping_type[ $bsppcak ] ) && 'amount' == $_bsd_spscwt_shipping_type[ $bsppcak ] ) ? 'bsd_hidden' : ''; ?>" />

												<input type='number' min='0' step=".01" id='bsd_prod_shipping_amount_<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>' name='bsd_prod_shipping_amount[<?php echo (int) $post_id; ?>][<?php echo (int) $bsppcak; ?>]' value="<?php echo esc_attr( ( isset( $_bsd_prod_shipping_amount[ $bsppcak ] ) ) ? $_bsd_prod_shipping_amount[ $bsppcak ] : "" ); ?>" placeholder="e.g. 20" class="bsd_spscwt_shipping_amount <?php echo ( ( empty( $_bsd_spscwt_shipping_type[ $bsppcak ] ) || 'percentage' == $_bsd_spscwt_shipping_type[ $bsppcak ] ) ) ? 'bsd_hidden' : ''; ?>" />
												<div class="edit-form-btns prod_stv_btns">
													<button class="edit-form-ok-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
													<button class="edit-form-cancle-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
												</div>
											</div>

											<div class="selected_shipping_digit_wrapper">
												<?php
												if ( isset( $_bsd_spscwt_shipping_type[ $bsppcak ] ) && $_bsd_spscwt_shipping_type[ $bsppcak ] == 'percentage' ) {
													echo isset( $_bsd_prod_shipping_percentage[ $bsppcak ] ) ? esc_html( $_bsd_prod_shipping_percentage[ $bsppcak ] ) : '';
												} else {
													echo isset( $_bsd_prod_shipping_amount[ $bsppcak ] ) ? esc_html( $_bsd_prod_shipping_amount[ $bsppcak ] ) : '';
												}
												?>
											</div>
										</td>
										<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( implode( ', ', $cat_name ) ); ?></td>
										<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( $sku ); ?></td>
									</tr>
									<?php
								} else {
								?>
									<tr odd_even="<?php echo (int) $odd_even; ?>" class="simple-product-tr <?php echo ( $total_rows_counter == $last_row_counter ) ? 'border-bottom-1' : ''; ?> <?php echo ( $odd_even % 2 == 1 ) ? 'odd ' : 'even'; ?>">
										<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> text-center"><?php echo esc_html( $source_label ); ?></td>
										<!-- <td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> text-center"><?php echo esc_html__( 'Simple product', 'bsd-split-pay-stripe-connect-woo' ); ?></td> -->
										<td class="select_account_td_wrapper edit-item-parent">
											<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
											<div class="edit-form">
												<select name="_bsd_spscwt_product_connected_account[<?php echo (int) $post_id; ?>][<?php echo (int) $bsppcak; ?>]" id="sspscwsca_select_<?php echo (int) $bsppcak; ?>" class="sspscwsca_select">
													<?php

													if ( ! empty( $get_accounts ) ) {
													?>
														<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
														<?php
														foreach ( $get_accounts as $gak ) {
														?>
															<option value="<?php echo esc_attr( trim($gak['bsd_account_id']) ); ?>" <?php echo ( trim($gak['bsd_account_id']) == $bsppcav ) ? "selected='selected'" : ''; ?>><?php echo esc_html( empty( $gak['bsd_account_name'] ) ? $gak['bsd_account_id'] : $gak['bsd_account_name'] ); ?></option>
															<?php
														}
													}
													?>

												</select>


												<div class="edit-form-btns select_account_btns">
													<button class="edit-form-ok-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
													<button class="edit-form-cancle-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
												</div>
											</div>
											<div class="selected_account_id_wrapper"><?php echo esc_html( $bsppcav ); ?></div>
										</td>

										<td class="prod_selected_tt_td_wrapper edit-item-parent">
											<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
											<div class="edit-form">
												<select name="_bsd_spscwt_product_type[<?php echo (int) $post_id; ?>][<?php echo (int) $bsppcak; ?>]" class="bsd_spscwt_type" id="bsd_spscwt_type_<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>">
													<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
													<option value="percentage" <?php echo ( 'percentage' == $_bsd_spscwt_product_type[ $bsppcak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Percentage', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
													<option value="amount" <?php echo ( 'amount' == $_bsd_spscwt_product_type[ $bsppcak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
												</select>
												<div class="edit-form-btns prod_selected_tt_btns">
													<button class="edit-form-ok-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
													<button class="edit-form-cancle-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
												</div>
											</div>
											<div class="selecte_tt_wrapper">
												<?php
												if ( $_bsd_spscwt_product_type[ $bsppcak ] == 'percentage' ) {
													esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
												} elseif ( $_bsd_spscwt_product_type[ $bsppcak ] == 'amount' ) {
													esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
												}
												?>
											</div>
										</td>
										<td class="prod_tv_td_wrapper edit-item-parent">
											<a href="javascript:void(0);" class="edit-item selected_tt_value_wrapper" data-connected_account_index="<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
											<div class="edit-form">
												<input type='number' min='0' max="100" step=".01" id='bsd_split_pay_stripe_connect_woo_transfer_percentage_<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>' name='_stripe_connect_split_pay_transfer_percentage[<?php echo (int) $post_id; ?>][<?php echo (int) $bsppcak; ?>]' value="<?php echo esc_attr( $_stripe_connect_split_pay_transfer_percentage[ $bsppcak ] ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_input <?php echo ( 'amount' == $_bsd_spscwt_product_type[ $bsppcak ] ) ? 'bsd_hidden' : ''; ?>" />
												<input type='number' min='0' step=".01" id='bsd_spscwt_amount_<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>' name='_bsd_spscwt_product_amount[<?php echo (int) $post_id; ?>][<?php echo (int) $bsppcak; ?>]' value="<?php echo esc_attr( $_bsd_spscwt_product_amount[ $bsppcak ] ); ?>" placeholder="e.g. 20" class="bsd_spscwt_amount <?php echo ( empty( $_bsd_spscwt_product_type[ $bsppcak ] ) || 'percentage' == $_bsd_spscwt_product_type[ $bsppcak ] ) ? 'bsd_hidden' : ''; ?>" />
												<div class="edit-form-btns prod_tv_btns">
													<button class="edit-form-ok-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
													<button class="edit-form-cancle-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
												</div>
											</div>
											<div class="selected_transfer_value_wrapper">
												<?php
												if ( $_bsd_spscwt_product_type[ $bsppcak ] == 'percentage' ) {
													echo esc_html( $_stripe_connect_split_pay_transfer_percentage[ $bsppcak ] );
												} else {
													echo esc_html( $_bsd_spscwt_product_amount[ $bsppcak ] );
												}
												?>
											</div>
										</td>
										<td class="prod_selected_st_td_wrapper edit-item-parent">

											<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
											<div class="edit-form">
												<select name="bsd_spscwt_shipping_type[<?php echo (int) $post_id; ?>][<?php echo (int) $bsppcak; ?>]" class="bsd_spscwt_shipping_type" id="bsd_spscwt_shipping_type_<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>">
													<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
													<option value="percentage" <?php echo ( isset( $_bsd_spscwt_shipping_type[ $bsppcak ] ) && 'percentage' == $_bsd_spscwt_shipping_type[ $bsppcak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Percentage' ); ?></option>
													<option value="amount" <?php echo ( isset( $_bsd_spscwt_shipping_type[ $bsppcak ] ) && 'amount' == $_bsd_spscwt_shipping_type[ $bsppcak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Fixed Amount' ); ?></option>
												</select>

												<div class="edit-form-btns prod_selected_st_btns">
													<button class="edit-form-ok-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
													<button class="edit-form-cancle-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
												</div>
											</div>

											<div class="selected_shipping_type_wrapper">
												<?php
												if ( isset( $_bsd_spscwt_shipping_type[ $bsppcak ] ) && $_bsd_spscwt_shipping_type[ $bsppcak ] == 'percentage' ) {
													esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
												} elseif ( isset( $_bsd_spscwt_shipping_type[ $bsppcak ] ) && $_bsd_spscwt_shipping_type[ $bsppcak ] == 'amount' ) {
													esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
												}
												?>
											</div>
										</td>
										<td class="prod_stv_td_wrapper edit-item-parent">

											<a href="javascript:void(0);" class="edit-item selected_stv_value_wrapper" data-connected_account_index="<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
											<div class="edit-form">
												<input type='number' min='0' max="100" step=".01" id='bsd_prod_shipping_percentage_<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>' name='bsd_prod_shipping_percentage[<?php echo (int) $post_id; ?>][<?php echo (int) $bsppcak; ?>]' value="<?php echo esc_attr( ( isset( $_bsd_prod_shipping_percentage[ $bsppcak ] ) ) ? $_bsd_prod_shipping_percentage[ $bsppcak ] : "" ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_shipping_input <?php echo ( isset( $_bsd_spscwt_shipping_type[ $bsppcak ] ) && 'amount' == $_bsd_spscwt_shipping_type[ $bsppcak ] ) ? 'bsd_hidden' : ''; ?>" />

												<input type='number' min='0' step=".01" id='bsd_prod_shipping_amount_<?php echo esc_attr( $post_id . '_' . $bsppcak ); ?>' name='bsd_prod_shipping_amount[<?php echo (int) $post_id; ?>][<?php echo (int) $bsppcak; ?>]' value="<?php echo esc_attr( ( isset( $_bsd_prod_shipping_amount[ $bsppcak ] ) ) ? $_bsd_prod_shipping_amount[ $bsppcak ] : "" ); ?>" placeholder="e.g. 20" class="bsd_spscwt_shipping_amount <?php echo ( ( empty( $_bsd_spscwt_shipping_type[ $bsppcak ] ) || 'percentage' == $_bsd_spscwt_shipping_type[ $bsppcak ] ) ) ? 'bsd_hidden' : ''; ?>" />
												<div class="edit-form-btns prod_stv_btns">
													<button class="edit-form-ok-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
													<button class="edit-form-cancle-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
												</div>
											</div>

											<div class="selected_shipping_digit_wrapper">
												<?php
												if ( isset( $_bsd_spscwt_shipping_type[ $bsppcak ] ) && $_bsd_spscwt_shipping_type[ $bsppcak ] == 'percentage' ) {
													echo isset( $_bsd_prod_shipping_percentage[ $bsppcak ] ) ? esc_html( $_bsd_prod_shipping_percentage[ $bsppcak ] ) : '';
												} else {
													echo isset( $_bsd_prod_shipping_amount[ $bsppcak ] ) ? esc_html( $_bsd_prod_shipping_amount[ $bsppcak ] ) : '';
												}
												?>
											</div>
										</td>
										<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( implode( ', ', $cat_name ) ); ?></td>
										<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( $sku ); ?></td>
									</tr>
									<?php
								}
								?>

								<?php
								++$last_row_counter;
							}
						}
						if ( empty( $_bsd_spscwt_product_connected_account ) ) {
							?>
							<input type="hidden" name="product_type[<?php echo (int) $post_id; ?>]" value="<?php echo esc_attr( $product_type ); ?>" />
							<tr odd_even="<?php echo (int) $odd_even; ?>" class="simple-product-tr border-bottom-1 <?php echo ( $odd_even % 2 == 1 ) ? 'odd ' : 'even'; ?>">
								<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> text-center"><?php echo esc_html( $source_label ); ?></td>
								<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> td-right-border variable-td-border-bottom" rowspan="1">
									<a href="<?php echo esc_url( get_edit_post_link( $post_id ) ); ?>" target="_blank" rel="noopener noreferrer">
										<?php echo esc_html( get_the_title() ); ?>
									</a>
								</td>
								<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html__( 'Simple product', 'bsd-split-pay-stripe-connect-woo' ); ?></td>
								<td class="select_account_td_wrapper edit-item-parent">
									<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
									<div class="edit-form">
										<select name="_bsd_spscwt_product_connected_account[<?php echo (int) $post_id; ?>][0]" id="sspscwsca_select_0" class="sspscwsca_select">
											<?php

											if ( ! empty( $get_accounts ) ) {
											?>
												<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
												<?php
												foreach ( $get_accounts as $gak ) {
												?>
													<option value="<?php echo esc_attr( trim($gak['bsd_account_id']) ); ?>"><?php echo esc_html( empty( $gak['bsd_account_name'] ) ? $gak['bsd_account_id'] : $gak['bsd_account_name'] ); ?></option>
													<?php
												}
											}
											?>

										</select>


										<div class="edit-form-btns select_account_btns">
											<button class="edit-form-ok-btn" type="button">
												<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
											<button class="edit-form-cancle-btn" type="button">
												<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
										</div>
									</div>
									<div class="selected_account_id_wrapper"></div>
								</td>

								<td class="prod_selected_tt_td_wrapper edit-item-parent">
									<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
									<div class="edit-form">
										<select name="_bsd_spscwt_product_type[<?php echo (int) $post_id; ?>][0]" class="bsd_spscwt_type" id="bsd_spscwt_type_zero">
											<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
											<option value="percentage"><?php echo esc_html__( 'Percentage', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
											<option value="amount"><?php echo esc_html__( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
										</select>
										<div class="edit-form-btns prod_selected_tt_btns">
											<button class="edit-form-ok-btn" type="button">
												<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
											<button class="edit-form-cancle-btn" type="button">
												<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
										</div>
									</div>
									<div class="selecte_tt_wrapper"></div>
								</td>
								<td class="prod_tv_td_wrapper edit-item-parent">
									<a href="javascript:void(0);" class="edit-item selected_tt_value_wrapper" data-connected_account_index="zero"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
									<div class="edit-form">
										<input type='number' min='0' max="100" step=".01" id='bsd_split_pay_stripe_connect_woo_transfer_percentage_zero' name='_stripe_connect_split_pay_transfer_percentage[<?php echo (int) $post_id; ?>][0]' value="" placeholder="e.g. 10" class="bsd_spscwtp_input" />
										<input type='number' min='0' step=".01" id='bsd_spscwt_amount_zero' name='_bsd_spscwt_product_amount[<?php echo (int) $post_id; ?>][0]' value="" placeholder="e.g. 20" class="bsd_spscwt_amount bsd_hidden" />
										<div class="edit-form-btns prod_tv_btns">
											<button class="edit-form-ok-btn" type="button">
												<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
											<button class="edit-form-cancle-btn" type="button">
												<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
										</div>
									</div>
									<div class="selected_transfer_value_wrapper"></div>
								</td>
								<td class="prod_selected_st_td_wrapper edit-item-parent">

									<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
									<div class="edit-form">
										<select name="bsd_spscwt_shipping_type[<?php echo (int) $post_id; ?>][0]" class="bsd_spscwt_shipping_type" id="bsd_spscwt_shipping_type_zero">
											<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
											<option value="percentage"><?php echo esc_html( 'Percentage' ); ?></option>
											<option value="amount"><?php echo esc_html( 'Fixed Amount' ); ?></option>
										</select>

										<div class="edit-form-btns prod_selected_st_btns">
											<button class="edit-form-ok-btn" type="button">
												<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
											<button class="edit-form-cancle-btn" type="button">
												<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
										</div>
									</div>

									<div class="selected_shipping_type_wrapper"></div>
								</td>
								<td class="prod_stv_td_wrapper edit-item-parent">

									<a href="javascript:void(0);" class="edit-item selected_stv_value_wrapper" data-connected_account_index="zero"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
									<div class="edit-form">
										<input type='number' min='0' max="100" step=".01" id='bsd_prod_shipping_percentage_zero' name='bsd_prod_shipping_percentage[<?php echo (int) $post_id; ?>][0]' value="" placeholder="e.g. 10" class="bsd_spscwtp_shipping_input" />

										<input type='number' min='0' step=".01" id='bsd_prod_shipping_amount_zero' name='bsd_prod_shipping_amount[<?php echo (int) $post_id; ?>][0]' value="" placeholder="e.g. 20" class="bsd_spscwt_shipping_amount bsd_hidden" />
										<div class="edit-form-btns prod_stv_btns">
											<button class="edit-form-ok-btn" type="button">
												<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
											<button class="edit-form-cancle-btn" type="button">
												<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
										</div>
									</div>

									<div class="selected_shipping_digit_wrapper"></div>
								</td>
								<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( implode( ', ', $cat_name ) ); ?></td>
								<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( $sku ); ?></td>
							</tr>
							<?php
						}
					}

					if ( $product_type == 'variable' ) {
						$variations                   = $product->get_available_variations();
						$variation_counter            = count( $variations );
						$total_variations             = $total_variations + $variation_counter;
						$first_td_counter             = 1;
						$total_more_then_one_accounts = 0;
						if ( ! empty( $variations ) ) {
							$variation_td_counter = 1;
							$first_td_rowspan     = $variation_counter;
							foreach ( $variations as $variation ) {
								$variation_id = $variation['variation_id'];

								if ( ! $all_variations && isset( $only_matched_child_ids[ $post_id ] ) && ! in_array( $variation_id, $only_matched_child_ids[ $post_id ] ) ) {
									$first_td_rowspan = $first_td_rowspan - 1;
									$total_variations = $total_variations - 1;
									continue;
								}
								$connected_account         = get_post_meta( $variation_id, '_bsd_spscwt_product_connected_account', true );
								$connected_account_counter = is_array( $connected_account ) ? count( $connected_account ) : 0;
								// $first_td_rowspan          = $first_td_rowspan + $connected_account_counter;
								if ( $connected_account_counter > 1 ) {
									$total_more_then_one_accounts = $total_more_then_one_accounts + ( $connected_account_counter - 1 );
								}
							}
							$first_td_rowspan = $first_td_rowspan + $total_more_then_one_accounts;

							foreach ( $variations as $variation ) {
								$variation_id = $variation['variation_id'];

								if ( ! $all_variations && isset( $only_matched_child_ids[ $post_id ] ) && ! in_array( $variation_id, $only_matched_child_ids[ $post_id ] ) ) {

									continue;
								}
									$connected_account                             = get_post_meta( $variation_id, '_bsd_spscwt_product_connected_account', true );
									$connected_product_type                        = get_post_meta( $variation_id, '_bsd_spscwt_product_type', true );
									$product_amount                                = get_post_meta( $variation_id, '_bsd_spscwt_product_amount', true );
									$_stripe_connect_split_pay_transfer_percentage = get_post_meta( $variation_id, '_stripe_connect_split_pay_transfer_percentage', true );

									/* shipping */
									$connected_shipping_type       = get_post_meta( $variation_id, '_bsd_spscwt_shipping_type', true );
									$shipping_amount               = get_post_meta( $variation_id, '_bsd_prod_shipping_amount', true );
									$_bsd_prod_shipping_percentage = get_post_meta( $variation_id, '_bsd_prod_shipping_percentage', true );

									$connected_account_counter    = is_array( $connected_account ) ? count( $connected_account ) : 0;
									$connected_account_td_counter = 1;
									$last_row_counter             = 1;
									if ( $connected_account_counter ) {
									foreach ( $connected_account as $cak => $cav ) {
										?>
	
											<input type="hidden" name="product_type[<?php echo (int) $variation_id; ?>]" value="<?php echo esc_attr( $product_type ); ?>" />
	
										<?php
										if ( $first_td_counter == 1 && $variation_td_counter == 1 && $connected_account_td_counter == 1 ) {
							?>
												<tr total_coonected_accounts="<?php echo (int) $total_more_then_one_accounts; ?>" condition="<?php echo 'first_td_counter == 1 && variation_td_counter == 1 && connected_account_td_counter == 1'; ?>" product_amount="<?php echo json_encode( $product_amount ); ?>" odd_even="<?php echo (int) $odd_even; ?>" connected_account_data="<?php echo json_encode( $connected_account ); ?>" variation_id="<?php echo (int) $variation_id; ?>" first_td_counter="<?php echo (int) $first_td_counter; ?>" variation_td_counter="<?php echo (int) $variation_td_counter; ?>" connected_account_td_counter="<?php echo (int) $connected_account_td_counter; ?>" class="variable-product-tr <?php echo ( $odd_even % 2 == 0 ) ? 'even' : 'odd'; ?> <?php echo ( $connected_account_counter == $last_row_counter ) ? 'border-bottom-1' : ''; ?>">
													<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> text-center"><?php echo esc_html( $source_label ); ?></td>
													<td rowspan="<?php echo (int) $first_td_rowspan; ?>" class="variable-td-border-bottom <?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> td-right-border">
														<a href="<?php echo esc_url( get_edit_post_link( $post_id ) ); ?>" target="_blank" rel="noopener noreferrer"><?php echo esc_html( get_the_title() ); ?></a>
								</td>
													<td class="variable-td-border-bottom text-center <?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>" rowspan="<?php echo (int) $connected_account_counter; ?>"><?php echo wp_kses_post( ucfirst( implode( '<br>', $variation['attributes'] ) ) ); ?></td>
	
													<td class="select_account_td_wrapper edit-item-parent">
														<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
									<div class="edit-form">
															<select name="_bsd_spscwt_product_connected_account[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" id="sspscwsca_select_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>" class="sspscwsca_select">
											<?php

											if ( ! empty( $get_accounts ) ) {
											?>
												<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
												<?php
												foreach ( $get_accounts as $gak ) {
												?>
																		<option value="<?php echo esc_attr( $gak['bsd_account_id'] ); ?>" <?php echo ( $gak['bsd_account_id'] == $cav ) ? "selected='selected'" : ''; ?>><?php echo esc_html( empty( $gak['bsd_account_name'] ) ? $gak['bsd_account_id'] : $gak['bsd_account_name'] ); ?></option>
													<?php
												}
											}
											?>

										</select>


										<div class="edit-form-btns select_account_btns">
											<button class="edit-form-ok-btn" type="button">
																	<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
											<button class="edit-form-cancle-btn" type="button">
																	<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
										</div>
									</div>
														<div class="selected_account_id_wrapper"><?php echo esc_html( $cav ); ?></div>
								</td>

													<td class="prod_selected_tt_td_wrapper edit-item-parent">
	
														<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
									<div class="edit-form">
															<select name="_bsd_spscwt_product_type[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" class="bsd_spscwt_type" id="bsd_spscwt_type_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>">
																<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
																<option value="percentage" <?php echo ( 'percentage' == $connected_product_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Percentage', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
																<option value="amount" <?php echo ( 'amount' == $connected_product_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
										</select>
										<div class="edit-form-btns prod_selected_tt_btns">
											<button class="edit-form-ok-btn" type="button">
																	<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
											<button class="edit-form-cancle-btn" type="button">
																	<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
										</div>
									</div>
	
														<div class="selecte_tt_wrapper">
															<?php
															if ( $connected_product_type[ $cak ] == 'percentage' ) {
																esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
															} elseif ( $connected_product_type[ $cak ] == 'amount' ) {
																esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
															}
															?>
														</div>
								</td>
	
													<td class="prod_tv_td_wrapper edit-item-parent">
	
														<a href="javascript:void(0);" class="edit-item selected_tt_value_wrapper" data-connected_account_index="<?php echo esc_attr( $variation_id . '_' . $cak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
									<div class="edit-form">
															<input type='number' min='0' max="100" step=".01" id='bsd_split_pay_stripe_connect_woo_transfer_percentage_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='_stripe_connect_split_pay_transfer_percentage[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_html( $_stripe_connect_split_pay_transfer_percentage[ $cak ] ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_input <?php echo ( 'amount' == $connected_product_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
															<input type='number' min='0' step=".01" id='bsd_spscwt_amount_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='_bsd_spscwt_product_amount[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_html( $product_amount[ $cak ] ); ?>" placeholder="e.g. 20" class="bsd_spscwt_amount <?php echo ( empty( $connected_product_type[ $cak ] ) || 'percentage' == $connected_product_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
										<div class="edit-form-btns prod_tv_btns">
											<button class="edit-form-ok-btn" type="button">
																	<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
											<button class="edit-form-cancle-btn" type="button">
																	<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
										</div>
									</div>
														<div class="selected_transfer_value_wrapper">
															<?php
															if ( $connected_product_type[ $cak ] == 'percentage' ) {
															?>
																<?php echo esc_html( $_stripe_connect_split_pay_transfer_percentage[ $cak ] ); ?>
																<?php
															} else {
															?>
																<?php echo esc_html( $product_amount[ $cak ] ); ?>
																<?php
															}
															?>
														</div>
								</td>

													<td class="prod_selected_st_td_wrapper edit-item-parent">
														<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
									<div class="edit-form">
															<select name="bsd_spscwt_shipping_type[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" class="bsd_spscwt_shipping_type" id="bsd_spscwt_shipping_type_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>">
																<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
																<option value="percentage" <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'percentage' == $connected_shipping_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Percentage' ); ?></option>
																<option value="amount" <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'amount' == $connected_shipping_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Fixed Amount' ); ?></option>
										</select>

										<div class="edit-form-btns prod_selected_st_btns">
											<button class="edit-form-ok-btn" type="button">
																	<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
											<button class="edit-form-cancle-btn" type="button">
																	<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
										</div>
									</div>

														<div class="selected_shipping_type_wrapper">
															<?php
															if ( $connected_shipping_type[ $cak ] == 'percentage' ) {
																esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
															} elseif ( $connected_shipping_type[ $cak ] == 'amount' ) {
																esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
															}
															?>
														</div>
								</td>

													<td class="prod_stv_td_wrapper edit-item-parent">
	
	
														<a href="javascript:void(0);" class="edit-item selected_stv_value_wrapper" data-connected_account_index="<?php echo esc_attr( $variation_id . '_' . $cak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
									<div class="edit-form">
															<input type='number' min='0' max="100" step=".01" id='bsd_prod_shipping_percentage_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='bsd_prod_shipping_percentage[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_attr( ( isset( $_bsd_prod_shipping_percentage[ $cak ] ) ) ? $_bsd_prod_shipping_percentage[ $cak ] : "" ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_shipping_input <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'amount' == $connected_shipping_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
															<input type='number' min='0' step=".01" id='bsd_prod_shipping_amount_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='bsd_prod_shipping_amount[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_attr( ( isset( $shipping_amount[ $cak ] ) ) ? $shipping_amount[ $cak ] : "" ); ?>" placeholder="e.g. 20" class="bsd_spscwt_shipping_amount <?php echo ( ( empty( $connected_shipping_type[ $cak ] ) || 'percentage' == $connected_shipping_type[ $cak ] ) ) ? 'bsd_hidden' : ''; ?>" />
										<div class="edit-form-btns prod_stv_btns">
											<button class="edit-form-ok-btn" type="button">
																	<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
											<button class="edit-form-cancle-btn" type="button">
																	<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
											</button>
										</div>
									</div>

														<div class="selected_shipping_digit_wrapper">
															<?php
															if ( $connected_shipping_type[ $cak ] == 'percentage' ) {
															?>
																<?php echo esc_html( $_bsd_prod_shipping_percentage[ $cak ] ); ?>
																<?php
															} else {
															?>
																<?php echo esc_html( $shipping_amount[ $cak ] ); ?>
																<?php
															}
															?>
														</div>
								</td>
								<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( implode( ', ', $cat_name ) ); ?></td>
													<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( $variation['sku'] ); ?></td>
							</tr>
							<?php
								}
						?>

										<?php
										if ( $first_td_counter == 1 && $variation_td_counter == 1 && $connected_account_td_counter > 1 ) {
										?>
												<tr condition="<?php echo 'first_td_counter == 1 && variation_td_counter == 1 && connected_account_td_counter > 1'; ?>" product_amount="<?php echo json_encode( $product_amount ); ?>" odd_even="<?php echo (int) $odd_even; ?>" connected_account_data="<?php echo json_encode( $connected_account ); ?>" variation_id="<?php echo (int) $variation_id; ?>" first_td_counter="<?php echo (int) $first_td_counter; ?>" variation_td_counter="<?php echo (int) $variation_td_counter; ?>" connected_account_td_counter="<?php echo (int) $connected_account_td_counter; ?>" class="variable-product-tr <?php echo ( $odd_even % 2 == 0 ) ? 'even' : 'odd'; ?> <?php echo ( $connected_account_counter == $last_row_counter ) ? 'border-bottom-1' : ''; ?>">
												<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> text-center"><?php echo esc_html( $source_label ); ?></td>
												<td rowspan="<?php echo (int) $first_td_rowspan; ?>" class="variable-td-border-bottom <?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> td-right-border">
													<a href="<?php echo esc_url( get_edit_post_link( $post_id ) ); ?>" target="_blank" rel="noopener noreferrer"><?php echo esc_html( get_the_title() ); ?></a>
												</td>
												<td class="variable-td-border-bottom text-center <?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>" rowspan="<?php echo (int) $connected_account_counter; ?>"><?php echo wp_kses_post( ucfirst( implode( '<br>', $variation['attributes'] ) ) ); ?></td>

												<td class="select_account_td_wrapper  edit-item-parent">
													<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
													<div class="edit-form">
														<select name="_bsd_spscwt_product_connected_account[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" id="sspscwsca_select_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>" class="sspscwsca_select">
															<?php

															if ( ! empty( $get_accounts ) ) {
															?>
																<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
																<?php
																foreach ( $get_accounts as $gak ) {
																?>
																	<option value="<?php echo esc_attr( trim($gak['bsd_account_id']) ); ?>" <?php echo ( trim($gak['bsd_account_id']) == $cav ) ? "selected='selected'" : ''; ?>><?php echo esc_html( empty( $gak['bsd_account_name'] ) ? $gak['bsd_account_id'] : $gak['bsd_account_name'] ); ?></option>
																	<?php
																}
															}
															?>

														</select>


														<div class="edit-form-btns select_account_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>
													<div class="selected_account_id_wrapper"><?php echo esc_html( $cav ); ?></div>
												</td>

												<td class="prod_selected_tt_td_wrapper  edit-item-parent">

													<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
													<div class="edit-form">
														<select name="_bsd_spscwt_product_type[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" class="bsd_spscwt_type" id="bsd_spscwt_type_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>">
															<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
															<option value="percentage" <?php echo ( 'percentage' == $connected_product_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Percentage', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
															<option value="amount" <?php echo ( 'amount' == $connected_product_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
														</select>
														<div class="edit-form-btns prod_selected_tt_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>

													<div class="selecte_tt_wrapper">
														<?php
														if ( $connected_product_type[ $cak ] == 'percentage' ) {
															esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
														} elseif ( $connected_product_type[ $cak ] == 'amount' ) {
															esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
														}
														?>
													</div>
												</td>

												<td class="prod_tv_td_wrapper  edit-item-parent">

													<a href="javascript:void(0);" class="edit-item selected_tt_value_wrapper" data-connected_account_index="<?php echo esc_attr( $variation_id . '_' . $cak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
													<div class="edit-form">
														<input type='number' min='0' max="100" step=".01" id='bsd_split_pay_stripe_connect_woo_transfer_percentage_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='_stripe_connect_split_pay_transfer_percentage[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_html( $_stripe_connect_split_pay_transfer_percentage[ $cak ] ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_input <?php echo ( 'amount' == $connected_product_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
														<input type='number' min='0' step=".01" id='bsd_spscwt_amount_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='_bsd_spscwt_product_amount[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_html( $product_amount[ $cak ] ); ?>" placeholder="e.g. 20" class="bsd_spscwt_amount <?php echo ( empty( $connected_product_type[ $cak ] ) || 'percentage' == $connected_product_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
														<div class="edit-form-btns prod_tv_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>
													<div class="selected_transfer_value_wrapper">
														<?php
														if ( $connected_product_type[ $cak ] == 'percentage' ) {
														?>
															<?php echo esc_html( $_stripe_connect_split_pay_transfer_percentage[ $cak ] ); ?>
															<?php
														} else {
														?>
															<?php echo esc_html( $product_amount[ $cak ] ); ?>
															<?php
														}
														?>
													</div>
												</td>

												<td class="prod_selected_st_td_wrapper  edit-item-parent">
													<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
													<div class="edit-form">
														<select name="bsd_spscwt_shipping_type[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" class="bsd_spscwt_shipping_type" id="bsd_spscwt_shipping_type_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>">
															<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
															<option value="percentage" <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'percentage' == $connected_shipping_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Percentage' ); ?></option>
															<option value="amount" <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'amount' == $connected_shipping_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Fixed Amount' ); ?></option>
														</select>

														<div class="edit-form-btns prod_selected_st_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>

													<div class="selected_shipping_type_wrapper">
														<?php
														if ( $connected_shipping_type[ $cak ] == 'percentage' ) {
															esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
														} elseif ( $connected_shipping_type[ $cak ] == 'amount' ) {
															esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
														}
														?>
													</div>
												</td>

												<td class="prod_stv_td_wrapper edit-item-parent">


													<a href="javascript:void(0);" class="edit-item selected_stv_value_wrapper" data-connected_account_index="<?php echo esc_attr( $variation_id . '_' . $cak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
													<div class="edit-form">
														<input type='number' min='0' max="100" step=".01" id='bsd_prod_shipping_percentage_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='bsd_prod_shipping_percentage[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_attr( ( isset( $_bsd_prod_shipping_percentage[ $cak ] ) ) ? $_bsd_prod_shipping_percentage[ $cak ] : "" ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_shipping_input <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'amount' == $connected_shipping_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
														<input type='number' min='0' step=".01" id='bsd_prod_shipping_amount_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='bsd_prod_shipping_amount[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_attr( ( isset( $shipping_amount[ $cak ] ) ) ? $shipping_amount[ $cak ] : "" ); ?>" placeholder="e.g. 20" class="bsd_spscwt_shipping_amount <?php echo ( ( empty( $connected_shipping_type[ $cak ] ) || 'percentage' == $connected_shipping_type[ $cak ] ) ) ? 'bsd_hidden' : ''; ?>" />
														<div class="edit-form-btns prod_stv_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>

													<div class="selected_shipping_digit_wrapper">
														<?php
														if ( $connected_shipping_type[ $cak ] == 'percentage' ) {
														?>
															<?php echo esc_html( $_bsd_prod_shipping_percentage[ $cak ] ); ?>
															<?php
														} else {
														?>
															<?php echo esc_html( $shipping_amount[ $cak ] ); ?>
															<?php
														}
														?>
													</div>
												</td>
												<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( implode( ', ', $cat_name ) ); ?></td>
												<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( $variation['sku'] ); ?></td>
											</tr>
											<?php
										}
										?>

										<?php
										if ( $first_td_counter == 1 && $variation_td_counter > 1 && $connected_account_td_counter == 1 ) {
										?>
											<tr condition="<?php echo 'first_td_counter == 1 && variation_td_counter > 1 && connected_account_td_counter == 1'; ?>" product_amount="<?php echo json_encode( $product_amount ); ?>" odd_even="<?php echo (int) $odd_even; ?>" connected_account_data="<?php echo json_encode( $connected_account ); ?>" variation_id="<?php echo (int) $variation_id; ?>" first_td_counter="<?php echo (int) $first_td_counter; ?>" variation_td_counter="<?php echo (int) $variation_td_counter; ?>" connected_account_td_counter="<?php echo (int) $connected_account_td_counter; ?>" class="variable-product-tr <?php echo ( $odd_even % 2 == 0 ) ? 'even' : 'odd'; ?> <?php echo ( $connected_account_counter == $last_row_counter ) ? 'border-bottom-1' : ''; ?>">
												<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> text-center"><?php echo esc_html( $source_label ); ?></td>
												<td rowspan="<?php echo (int) $first_td_rowspan; ?>" class="variable-td-border-bottom <?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> td-right-border">
													<a href="<?php echo esc_url( get_edit_post_link( $post_id ) ); ?>" target="_blank" rel="noopener noreferrer"><?php echo esc_html( get_the_title() ); ?></a>
												</td>
												<td class="variable-td-border-bottom text-center <?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>" rowspan="<?php echo (int) $connected_account_counter; ?>"><?php echo wp_kses_post( ucfirst( implode( '<br>', $variation['attributes'] ) ) ); ?></td>

												<td class="select_account_td_wrapper  edit-item-parent">
													<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
													<div class="edit-form">
														<select name="_bsd_spscwt_product_connected_account[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" id="sspscwsca_select_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>" class="sspscwsca_select">
															<?php

															if ( ! empty( $get_accounts ) ) {
															?>
																<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
																<?php
																foreach ( $get_accounts as $gak ) {
																?>
																	<option value="<?php echo esc_attr( trim($gak['bsd_account_id']) ); ?>" <?php echo ( trim($gak['bsd_account_id']) == $cav ) ? "selected='selected'" : ''; ?>><?php echo esc_html( empty( $gak['bsd_account_name'] ) ? $gak['bsd_account_id'] : $gak['bsd_account_name'] ); ?></option>
																	<?php
																}
															}
															?>

														</select>


														<div class="edit-form-btns select_account_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>
													<div class="selected_account_id_wrapper"><?php echo esc_html( $cav ); ?></div>
												</td>

												<td class="prod_selected_tt_td_wrapper  edit-item-parent">

													<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
													<div class="edit-form">
														<select name="_bsd_spscwt_product_type[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" class="bsd_spscwt_type" id="bsd_spscwt_type_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>">
															<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
															<option value="percentage" <?php echo ( 'percentage' == $connected_product_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Percentage', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
															<option value="amount" <?php echo ( 'amount' == $connected_product_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
														</select>
														<div class="edit-form-btns prod_selected_tt_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>

													<div class="selecte_tt_wrapper">
														<?php
														if ( $connected_product_type[ $cak ] == 'percentage' ) {
															esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
														} elseif ( $connected_product_type[ $cak ] == 'amount' ) {
															esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
														}
														?>
													</div>
												</td>

												<td class="prod_tv_td_wrapper  edit-item-parent">

													<a href="javascript:void(0);" class="edit-item selected_tt_value_wrapper" data-connected_account_index="<?php echo esc_attr( $variation_id . '_' . $cak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
													<div class="edit-form">
														<input type='number' min='0' max="100" step=".01" id='bsd_split_pay_stripe_connect_woo_transfer_percentage_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='_stripe_connect_split_pay_transfer_percentage[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_html( $_stripe_connect_split_pay_transfer_percentage[ $cak ] ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_input <?php echo ( 'amount' == $connected_product_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
														<input type='number' min='0' step=".01" id='bsd_spscwt_amount_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='_bsd_spscwt_product_amount[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_html( $product_amount[ $cak ] ); ?>" placeholder="e.g. 20" class="bsd_spscwt_amount <?php echo ( empty( $connected_product_type[ $cak ] ) || 'percentage' == $connected_product_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
														<div class="edit-form-btns prod_tv_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>
													<div class="selected_transfer_value_wrapper">
														<?php
														if ( $connected_product_type[ $cak ] == 'percentage' ) {
														?>
															<?php echo esc_html( $_stripe_connect_split_pay_transfer_percentage[ $cak ] ); ?>
															<?php
														} else {
														?>
															<?php echo esc_html( $product_amount[ $cak ] ); ?>
															<?php
														}
														?>
													</div>
												</td>

												<td class="prod_selected_st_td_wrapper edit-item-parent">
													<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
													<div class="edit-form">
														<select name="bsd_spscwt_shipping_type[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" class="bsd_spscwt_shipping_type" id="bsd_spscwt_shipping_type_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>">
															<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
															<option value="percentage" <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'percentage' == $connected_shipping_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Percentage' ); ?></option>
															<option value="amount" <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'amount' == $connected_shipping_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Fixed Amount' ); ?></option>
														</select>

														<div class="edit-form-btns prod_selected_st_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>

													<div class="selected_shipping_type_wrapper">
														<?php
														if ( $connected_shipping_type[ $cak ] == 'percentage' ) {
															esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
														} elseif ( $connected_shipping_type[ $cak ] == 'amount' ) {
															esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
														}
														?>
													</div>
												</td>

												<td class="prod_stv_td_wrapper edit-item-parent">


													<a href="javascript:void(0);" class="edit-item selected_stv_value_wrapper" data-connected_account_index="<?php echo esc_attr( $variation_id . '_' . $cak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
													<div class="edit-form">
														<input type='number' min='0' max="100" step=".01" id='bsd_prod_shipping_percentage_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='bsd_prod_shipping_percentage[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_attr( ( isset( $_bsd_prod_shipping_percentage[ $cak ] ) ) ? $_bsd_prod_shipping_percentage[ $cak ] : "" ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_shipping_input <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'amount' == $connected_shipping_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
														<input type='number' min='0' step=".01" id='bsd_prod_shipping_amount_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='bsd_prod_shipping_amount[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_attr( ( isset( $shipping_amount[ $cak ] ) ) ? $shipping_amount[ $cak ] : "" ); ?>" placeholder="e.g. 20" class="bsd_spscwt_shipping_amount <?php echo ( ( empty( $connected_shipping_type[ $cak ] ) || 'percentage' == $connected_shipping_type[ $bsppcak ] ) ) ? 'bsd_hidden' : ''; ?>" />
														<div class="edit-form-btns prod_stv_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>

													<div class="selected_shipping_digit_wrapper">
														<?php
														if ( $connected_shipping_type[ $cak ] == 'percentage' ) {
														?>
															<?php echo esc_html( $_bsd_prod_shipping_percentage[ $cak ] ); ?>
															<?php
														} else {
														?>
															<?php echo esc_html( $shipping_amount[ $cak ] ); ?>
															<?php
														}
														?>
													</div>
												</td>
												<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( implode( ', ', $cat_name ) ); ?></td>
												<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( $variation['sku'] ); ?></td>
											</tr>
											<?php
										}
										?>

										<?php
										if ( $first_td_counter > 1 && $variation_td_counter == 1 && $connected_account_td_counter > 1 ) {
										?>
											<tr condition="<?php echo 'first_td_counter > 1 && variation_td_counter == 1 && connected_account_td_counter > 1'; ?>" variation_id="<?php echo (int) $variation_id; ?>" first_td_counter="<?php echo (int) $first_td_counter; ?>" variation_td_counter="<?php echo (int) $variation_td_counter; ?>" connected_account_td_counter="<?php echo (int) $connected_account_td_counter; ?>" class="variable-product-tr <?php echo ( $odd_even % 2 == 0 ) ? 'even' : 'odd'; ?> <?php echo ( $connected_account_counter == $last_row_counter ) ? 'border-bottom-1' : ''; ?>">
												<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> text-center"><?php echo esc_html( $source_label ); ?></td>
												<td class="select_account_td_wrapper edit-item-parent">
													<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="" title="" /></a>
													<div class="edit-form">
														<select name="_bsd_spscwt_product_connected_account[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" id="sspscwsca_select_<?php echo (int) $cak; ?>" class="sspscwsca_select">
															<?php

															if ( ! empty( $get_accounts ) ) {
															?>
																<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
																<?php
																foreach ( $get_accounts as $gak ) {
																?>
																	<option value="<?php echo esc_attr( trim($gak['bsd_account_id']) ); ?>" <?php echo ( trim($gak['bsd_account_id']) == $cav ) ? "selected='selected'" : ''; ?>><?php echo esc_html( empty( $gak['bsd_account_name'] ) ? $gak['bsd_account_id'] : $gak['bsd_account_name'] ); ?></option>
																	<?php
																}
															}
															?>

														</select>


														<div class="edit-form-btns select_account_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>
													<div class="selected_account_id_wrapper"><?php echo esc_html( $cav ); ?></div>
												</td>
												<td class="prod_selected_tt_td_wrapper edit-item-parent">

													<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
													<div class="edit-form">
														<select name="_bsd_spscwt_product_type[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" class="bsd_spscwt_type" id="bsd_spscwt_type_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>">
															<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
															<option value="percentage" <?php echo ( 'percentage' == $connected_product_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Percentage', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
															<option value="amount" <?php echo ( 'amount' == $connected_product_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
														</select>
														<div class="edit-form-btns prod_selected_tt_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>

													<div class="selecte_tt_wrapper">
														<?php
														if ( $connected_product_type[ $cak ] == 'percentage' ) {
															esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
														} elseif ( $connected_product_type[ $cak ] == 'amount' ) {
															esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
														}
														?>
													</div>
												</td>

												<td class="prod_tv_td_wrapper edit-item-parent">

													<a href="javascript:void(0);" class="edit-item selected_tt_value_wrapper" data-connected_account_index="<?php echo esc_attr( $variation_id . '_' . $cak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
													<div class="edit-form">
														<input type='number' min='0' max="100" step=".01" id='bsd_split_pay_stripe_connect_woo_transfer_percentage_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='_stripe_connect_split_pay_transfer_percentage[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_html( $_stripe_connect_split_pay_transfer_percentage[ $cak ] ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_input <?php echo ( 'amount' == $connected_product_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
														<input type='number' min='0' step=".01" id='bsd_spscwt_amount_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='_bsd_spscwt_product_amount[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_html( $product_amount[ $cak ] ); ?>" placeholder="e.g. 20" class="bsd_spscwt_amount <?php echo ( empty( $connected_product_type[ $cak ] ) || 'percentage' == $connected_product_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
														<div class="edit-form-btns prod_tv_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>
													<div class="selected_transfer_value_wrapper">
														<?php
														if ( $connected_product_type[ $cak ] == 'percentage' ) {
														?>
															<?php echo esc_html( $_stripe_connect_split_pay_transfer_percentage[ $cak ] ); ?>
															<?php
														} else {
														?>
															<?php echo esc_html( $product_amount[ $cak ] ); ?>
															<?php
														}
														?>
													</div>
												</td>

												<td class="prod_selected_st_td_wrapper edit-item-parent">
													<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
													<div class="edit-form">
														<select name="bsd_spscwt_shipping_type[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" class="bsd_spscwt_shipping_type" id="bsd_spscwt_shipping_type_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>">
															<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>  
															<option value="percentage" <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'percentage' == $connected_shipping_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Percentage' ); ?></option>
															<option value="amount" <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'amount' == $connected_shipping_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Fixed Amount' ); ?></option>
														</select>

														<div class="edit-form-btns prod_selected_st_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>

													<div class="selected_shipping_type_wrapper">
														<?php
														if ( $connected_shipping_type[ $cak ] == 'percentage' ) {
															esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
														} elseif ( $connected_shipping_type[ $cak ] == 'amount' ) {
															esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
														}
														?>
													</div>
												</td>

												<td class="prod_stv_td_wrapper edit-item-parent">


													<a href="javascript:void(0);" class="edit-item selected_stv_value_wrapper" data-connected_account_index="<?php echo esc_attr( $variation_id . '_' . $cak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
													<div class="edit-form">
														<input type='number' min='0' max="100" step=".01" id='bsd_prod_shipping_percentage_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='bsd_prod_shipping_percentage[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_attr( ( isset( $_bsd_prod_shipping_percentage[ $cak ] ) ) ? $_bsd_prod_shipping_percentage[ $cak ] : "" ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_shipping_input <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'amount' == $connected_shipping_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
														<input type='number' min='0' step=".01" id='bsd_prod_shipping_amount_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='bsd_prod_shipping_amount[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_attr( ( isset( $shipping_amount[ $cak ] ) ) ? $shipping_amount[ $cak ] : "" ); ?>" placeholder="e.g. 20" class="bsd_spscwt_shipping_amount <?php echo ( ( empty( $connected_shipping_type[ $cak ] ) || 'percentage' == $connected_shipping_type[ $cak ] ) ) ? 'bsd_hidden' : ''; ?>" />
														<div class="edit-form-btns prod_stv_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>

													<div class="selected_shipping_digit_wrapper">
														<?php
														if ( $connected_shipping_type[ $cak ] == 'percentage' ) {
														?>
															<?php echo esc_html( $_bsd_prod_shipping_percentage[ $cak ] ); ?>
															<?php
														} else {
														?>
															<?php echo esc_html( $shipping_amount[ $cak ] ); ?>
															<?php
														}
														?>
													</div>
												</td>

												<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( implode( ', ', $cat_name ) ); ?></td>
												<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( $variation['sku'] ); ?></td>
											</tr>
											<?php
										}
										?>


										<?php
										if ( $first_td_counter > 1 && $variation_td_counter > 1 && $connected_account_td_counter == 1 ) {
										?>
											<tr condition="<?php echo 'first_td_counter > 1 && variation_td_counter > 1 && connected_account_td_counter == 1'; ?>" first_td_counter="<?php echo (int) $first_td_counter; ?>" variation_td_counter="<?php echo (int) $variation_td_counter; ?>" connected_account_td_counter="<?php echo (int) $connected_account_td_counter; ?>" class="variable-product-tr <?php echo ( $odd_even % 2 == 0 ) ? 'even' : 'odd'; ?> <?php echo ( $connected_account_counter == $last_row_counter ) ? 'border-bottom-1' : ''; ?>">
													<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> text-center"><?php echo esc_html( $source_label ); ?></td>
													<td class="text-center variable-td-border-bottom <?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>" rowspan="<?php /* echo (int) $connected_account_counter; */ ?>"><?php echo wp_kses_post( ucfirst( implode( '<br>', $variation['attributes'] ) ) ); ?></td>
												<td class="select_account_td_wrapper edit-item-parent">
													<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="" title="" /></a>
													<div class="edit-form">
														<select name="_bsd_spscwt_product_connected_account[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" id="sspscwsca_select_<?php echo (int) $cak; ?>" class="sspscwsca_select">
															<?php

															if ( ! empty( $get_accounts ) ) {
															?>
																<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
																<?php
																foreach ( $get_accounts as $gak ) {
																?>
																	<option value="<?php echo esc_attr( trim($gak['bsd_account_id']) ); ?>" <?php echo ( trim($gak['bsd_account_id']) == $cav ) ? "selected='selected'" : ''; ?>><?php echo esc_html( empty( $gak['bsd_account_name'] ) ? $gak['bsd_account_id'] : $gak['bsd_account_name'] ); ?></option>
																	<?php
																}
															}
															?>

														</select>


														<div class="edit-form-btns select_account_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>
													<div class="selected_account_id_wrapper"><?php echo esc_html( $cav ); ?></div>
												</td>
												<td class="prod_selected_tt_td_wrapper edit-item-parent">

													<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
													<div class="edit-form">
														<select name="_bsd_spscwt_product_type[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" class="bsd_spscwt_type" id="bsd_spscwt_type_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>">
															<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
															<option value="percentage" <?php echo ( 'percentage' == $connected_product_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Percentage', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
															<option value="amount" <?php echo ( 'amount' == $connected_product_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
														</select>
														<div class="edit-form-btns prod_selected_tt_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>

													<div class="selecte_tt_wrapper">
														<?php
														if ( $connected_product_type[ $cak ] == 'percentage' ) {
															esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
														} elseif ( $connected_product_type[ $cak ] == 'amount' ) {
															esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
														}
														?>
													</div>
												</td>
												<td class="prod_tv_td_wrapper edit-item-parent">

													<a href="javascript:void(0);" class="edit-item selected_tt_value_wrapper" data-connected_account_index="<?php echo esc_attr( $variation_id . '_' . $cak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
													<div class="edit-form">
														<input type='number' min='0' max="100" step=".01" id='bsd_split_pay_stripe_connect_woo_transfer_percentage_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='_stripe_connect_split_pay_transfer_percentage[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_html( $_stripe_connect_split_pay_transfer_percentage[ $cak ] ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_input <?php echo ( 'amount' == $connected_product_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
														<input type='number' min='0' step=".01" id='bsd_spscwt_amount_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='_bsd_spscwt_product_amount[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_html( $product_amount[ $cak ] ); ?>" placeholder="e.g. 20" class="bsd_spscwt_amount <?php echo ( empty( $connected_product_type[ $cak ] ) || 'percentage' == $connected_product_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
														<div class="edit-form-btns prod_tv_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>
													<div class="selected_transfer_value_wrapper">
														<?php
														if ( $connected_product_type[ $cak ] == 'percentage' ) {
														?>
															<?php echo esc_html( $_stripe_connect_split_pay_transfer_percentage[ $cak ] ); ?>
															<?php
														} else {
														?>
															<?php echo esc_html( $product_amount[ $cak ] ); ?>
															<?php
														}
														?>
													</div>
												</td>

												<td class="prod_selected_st_td_wrapper edit-item-parent">
													<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
													<div class="edit-form">
														<select name="bsd_spscwt_shipping_type[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" class="bsd_spscwt_shipping_type" id="bsd_spscwt_shipping_type_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>">
															<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
															<option value="percentage" <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'percentage' == $connected_shipping_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Percentage' ); ?></option>
															<option value="amount" <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'amount' == $connected_shipping_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Fixed Amount' ); ?></option>
														</select>

														<div class="edit-form-btns prod_selected_st_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>

													<div class="selected_shipping_type_wrapper">
														<?php
														if ( $connected_shipping_type[ $cak ] == 'percentage' ) {
															esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
														} elseif ( $connected_shipping_type[ $cak ] == 'amount' ) {
															esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
														}
														?>
													</div>
												</td>

												<td class="prod_stv_td_wrapper edit-item-parent">


													<a href="javascript:void(0);" class="edit-item selected_stv_value_wrapper" data-connected_account_index="<?php echo esc_attr( $variation_id . '_' . $cak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
													<div class="edit-form">
														<input type='number' min='0' max="100" step=".01" id='bsd_prod_shipping_percentage_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='bsd_prod_shipping_percentage[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_attr( ( isset( $_bsd_prod_shipping_percentage[ $cak ] ) ) ? $_bsd_prod_shipping_percentage[ $cak ] : "" ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_shipping_input <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'amount' == $connected_shipping_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
														<input type='number' min='0' step=".01" id='bsd_prod_shipping_amount_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='bsd_prod_shipping_amount[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_attr( ( isset( $shipping_amount[ $cak ] ) ) ? $shipping_amount[ $cak ] : "" ); ?>" placeholder="e.g. 20" class="bsd_spscwt_shipping_amount <?php echo ( ( empty( $connected_shipping_type[ $cak ] ) || 'percentage' == $connected_shipping_type[ $cak ] ) ) ? 'bsd_hidden' : ''; ?>" />
														<div class="edit-form-btns prod_stv_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>

													<div class="selected_shipping_digit_wrapper">
														<?php
														if ( $connected_shipping_type[ $cak ] == 'percentage' ) {
														?>
															<?php echo esc_html( $_bsd_prod_shipping_percentage[ $cak ] ); ?>
															<?php
														} else {
														?>
															<?php echo esc_html( $shipping_amount[ $cak ] ); ?>
															<?php
														}
														?>
													</div>
												</td>
												<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( implode( ', ', $cat_name ) ); ?></td>
												<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( $variation['sku'] ); ?></td>
											</tr>
											<?php
										}
										?>

										<?php
										if ( $first_td_counter > 1 && $variation_td_counter > 1 && $connected_account_td_counter > 1 ) {
										?>
											<tr condition="<?php echo 'first_td_counter > 1 && variation_td_counter > 1 && connected_account_td_counter > 1'; ?>" first_td_counter="<?php echo (int) $first_td_counter; ?>" variation_td_counter="<?php echo (int) $variation_td_counter; ?>" connected_account_td_counter="<?php echo (int) $connected_account_td_counter; ?>" class="variable-product-tr <?php echo ( $odd_even % 2 == 0 ) ? 'even' : 'odd'; ?> <?php echo ( $connected_account_counter == $last_row_counter ) ? 'border-bottom-1' : ''; ?>">
													<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> text-center"><?php echo esc_html( $source_label ); ?></td>
													<td class="text-center variable-td-border-bottom <?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>" rowspan="<?php /* echo (int) $connected_account_counter; */ ?>"><?php echo wp_kses_post( ucfirst( implode( '<br>', $variation['attributes'] ) ) ); ?></td>
												<td class="select_account_td_wrapper edit-item-parent">
													<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="" title="" /></a>
													<div class="edit-form">
														<select name="_bsd_spscwt_product_connected_account[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" id="sspscwsca_select_<?php echo (int) $cak; ?>" class="sspscwsca_select">
															<?php

															if ( ! empty( $get_accounts ) ) {
															?>
																<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
																<?php
																foreach ( $get_accounts as $gak ) {
																?>
																	<option value="<?php echo esc_attr( trim($gak['bsd_account_id']) ); ?>" <?php echo ( trim($gak['bsd_account_id']) == $cav ) ? "selected='selected'" : ''; ?>><?php echo esc_html( empty( $gak['bsd_account_name'] ) ? $gak['bsd_account_id'] : $gak['bsd_account_name'] ); ?></option>
																	<?php
																}
															}
															?>

														</select>


														<div class="edit-form-btns select_account_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>
													<div class="selected_account_id_wrapper"><?php echo esc_html( $cav ); ?></div>
												</td>
												<td class="prod_selected_tt_td_wrapper edit-item-parent">

													<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
													<div class="edit-form">
														<select name="_bsd_spscwt_product_type[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" class="bsd_spscwt_type" id="bsd_spscwt_type_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>">
															<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
															<option value="percentage" <?php echo ( 'percentage' == $connected_product_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Percentage', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
															<option value="amount" <?php echo ( 'amount' == $connected_product_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html__( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
														</select>
														<div class="edit-form-btns prod_selected_tt_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>

													<div class="selecte_tt_wrapper">
														<?php
														if ( $connected_product_type[ $cak ] == 'percentage' ) {
															esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
														} elseif ( $connected_product_type[ $cak ] == 'amount' ) {
															esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
														}
														?>
													</div>
												</td>
												<td class="prod_tv_td_wrapper edit-item-parent">

													<a href="javascript:void(0);" class="edit-item selected_tt_value_wrapper" data-connected_account_index="<?php echo esc_attr( $variation_id . '_' . $cak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
													<div class="edit-form">
														<input type='number' min='0' max="100" step=".01" id='bsd_split_pay_stripe_connect_woo_transfer_percentage_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='_stripe_connect_split_pay_transfer_percentage[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_html( $_stripe_connect_split_pay_transfer_percentage[ $cak ] ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_input <?php echo ( 'amount' == $connected_product_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
														<input type='number' min='0' step=".01" id='bsd_spscwt_amount_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='_bsd_spscwt_product_amount[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_html( $product_amount[ $cak ] ); ?>" placeholder="e.g. 20" class="bsd_spscwt_amount <?php echo ( empty( $connected_product_type[ $cak ] ) || 'percentage' == $connected_product_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
														<div class="edit-form-btns prod_tv_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>
													<div class="selected_transfer_value_wrapper">
														<?php
														if ( $connected_product_type[ $cak ] == 'percentage' ) {
														?>
															<?php echo esc_html( $_stripe_connect_split_pay_transfer_percentage[ $cak ] ); ?>
															<?php
														} else {
														?>
															<?php echo esc_html( $product_amount[ $cak ] ); ?>
															<?php
														}
														?>
													</div>
												</td>

												<td class="prod_selected_st_td_wrapper edit-item-parent">
													<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
													<div class="edit-form">
														<select name="bsd_spscwt_shipping_type[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]" class="bsd_spscwt_shipping_type" id="bsd_spscwt_shipping_type_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>">
															<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
															<option value="percentage" <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'percentage' == $connected_shipping_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Percentage' ); ?></option>
															<option value="amount" <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'amount' == $connected_shipping_type[ $cak ] ) ? "selected='selected'" : ''; ?>><?php echo esc_html( 'Fixed Amount' ); ?></option>
														</select>

														<div class="edit-form-btns prod_selected_st_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>

													<div class="selected_shipping_type_wrapper">
														<?php
														if ( $connected_shipping_type[ $cak ] == 'percentage' ) {
															esc_attr_e( 'Percentage', 'bsd-split-pay-stripe-connect-woo' );
														} elseif ( $connected_shipping_type[ $cak ] == 'amount' ) {
															esc_attr_e( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' );
														}
														?>
													</div>
												</td>

												<td class="prod_stv_td_wrapper edit-item-parent">


													<a href="javascript:void(0);" class="edit-item selected_stv_value_wrapper" data-connected_account_index="<?php echo esc_attr( $variation_id . '_' . $cak ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
													<div class="edit-form">
														<input type='number' min='0' max="100" step=".01" id='bsd_prod_shipping_percentage_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='bsd_prod_shipping_percentage[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_attr( ( isset( $_bsd_prod_shipping_percentage[ $cak ] ) ) ? $_bsd_prod_shipping_percentage[ $cak ] : "" ); ?>" placeholder="e.g. 10" class="bsd_spscwtp_shipping_input <?php echo ( isset( $connected_shipping_type[ $cak ] ) && 'amount' == $connected_shipping_type[ $cak ] ) ? 'bsd_hidden' : ''; ?>" />
														<input type='number' min='0' step=".01" id='bsd_prod_shipping_amount_<?php echo esc_attr( $variation_id . '_' . $cak ); ?>' name='bsd_prod_shipping_amount[<?php echo (int) $variation_id; ?>][<?php echo (int) $cak; ?>]' value="<?php echo esc_attr( ( isset( $shipping_amount[ $cak ] ) ) ? $shipping_amount[ $cak ] : "" ); ?>" placeholder="e.g. 20" class="bsd_spscwt_shipping_amount <?php echo ( ( empty( $connected_shipping_type[ $cak ] ) || 'percentage' == $connected_shipping_type[ $cak ] ) ) ? 'bsd_hidden' : ''; ?>" />
														<div class="edit-form-btns prod_stv_btns">
															<button class="edit-form-ok-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
															<button class="edit-form-cancle-btn" type="button">
																<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
															</button>
														</div>
													</div>

													<div class="selected_shipping_digit_wrapper">
														<?php
														if ( $connected_shipping_type[ $cak ] == 'percentage' ) {
														?>
															<?php echo esc_html( $_bsd_prod_shipping_percentage[ $cak ] ); ?>
															<?php
														} else {
														?>
															<?php echo esc_html( $shipping_amount[ $cak ] ); ?>
															<?php
														}
														?>
													</div>
												</td>
												<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( implode( ', ', $cat_name ) ); ?></td>
												<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( $variation['sku'] ); ?></td>
											</tr>
											<?php
										}
										?>


										<?php
										++$first_td_counter;
										++$connected_account_td_counter;
										++$last_row_counter;
									}
								}
								if ( empty( $connected_account ) ) {
									?>
									<input type="hidden" name="product_type[<?php echo (int) $variation_id; ?>]" value="<?php echo esc_attr( $product_type ); ?>" />

									<tr condition="No Account found" variation_id="<?php echo (int) $variation_id; ?>" class="variable-product-tr <?php echo ( $odd_even % 2 == 0 ) ? 'even' : 'odd'; ?> border-bottom-1">
										<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> text-center"><?php echo esc_html( $source_label ); ?></td>
									<?php
									// 3.7.5 static-analysis: $first_td_counter starts at 1 and only
									// increments, so the `== 0` branch was dead.
									if ( $first_td_counter == 1 ) {
										?>
										<td rowspan="1" class="variable-td-border-bottom <?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?> td-right-border">
											<a href="<?php echo esc_url( get_edit_post_link( $post_id ) ); ?>" target="_blank" rel="noopener noreferrer"><?php echo esc_html( get_the_title() ); ?></a>
										</td>
										<?php
									}
									?>
											
										<td class="variable-td-border-bottom text-center <?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>" rowspan="1"><?php echo wp_kses_post( ucfirst( implode( '<br>', $variation['attributes'] ) ) ); ?></td>

										<td class="select_account_td_wrapper edit-item-parent">
											<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
											<div class="edit-form">
												<select name="_bsd_spscwt_product_connected_account[<?php echo (int) $variation_id; ?>][0]" id="sspscwsca_select_<?php echo esc_attr( $variation_id . '_0' ); ?>" class="sspscwsca_select">
													<?php

													if ( ! empty( $get_accounts ) ) {
													?>
														<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
														<?php
														foreach ( $get_accounts as $gak ) {
														?>
															<option value="<?php echo esc_attr( trim($gak['bsd_account_id']) ); ?>"><?php echo esc_html( empty( $gak['bsd_account_name'] ) ? $gak['bsd_account_id'] : $gak['bsd_account_name'] ); ?></option>
															<?php
														}
													}
													?>

												</select>


												<div class="edit-form-btns select_account_btns">
													<button class="edit-form-ok-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
													<button class="edit-form-cancle-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
												</div>
											</div>
											<div class="selected_account_id_wrapper"></div>
										</td>

										<td class="prod_selected_tt_td_wrapper edit-item-parent">

											<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
											<div class="edit-form">
												<select name="_bsd_spscwt_product_type[<?php echo (int) $variation_id; ?>][0]" class="bsd_spscwt_type" id="bsd_spscwt_type_<?php echo esc_attr( $variation_id . '_0' ); ?>">
													<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
													<option value="percentage"><?php echo esc_html__( 'Percentage', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
													<option value="amount"><?php echo esc_html__( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
												</select>
												<div class="edit-form-btns prod_selected_tt_btns">
													<button class="edit-form-ok-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
													<button class="edit-form-cancle-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
												</div>
											</div>

											<div class="selecte_tt_wrapper"></div>
										</td>

										<td class="prod_tv_td_wrapper edit-item-parent">

											<a href="javascript:void(0);" class="edit-item selected_tt_value_wrapper" data-connected_account_index="<?php echo esc_attr( $variation_id . '_0' ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="Edit" title="Edit" /></a>
											<div class="edit-form">
												<input type='number' min='0' max="100" step=".01" id='bsd_split_pay_stripe_connect_woo_transfer_percentage_<?php echo esc_attr( $variation_id . '_0' ); ?>' name='_stripe_connect_split_pay_transfer_percentage[<?php echo (int) $variation_id; ?>][0]' value="" placeholder="e.g. 10" class="bsd_spscwtp_input" />
												<input type='number' min='0' step=".01" id='bsd_spscwt_amount_<?php echo esc_attr( $variation_id . '_0' ); ?>' name='_bsd_spscwt_product_amount[<?php echo (int) $variation_id; ?>][0]' value="" placeholder="e.g. 20" class="bsd_spscwt_amount bsd_hidden" />
												<div class="edit-form-btns prod_tv_btns">
													<button class="edit-form-ok-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
													<button class="edit-form-cancle-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
												</div>
											</div>
											<div class="selected_transfer_value_wrapper"></div>
										</td>

										<td class="prod_selected_st_td_wrapper edit-item-parent">
											<a href="javascript:void(0);" class="edit-item"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
											<div class="edit-form">
												<select name="bsd_spscwt_shipping_type[<?php echo (int) $variation_id; ?>][0]" class="bsd_spscwt_shipping_type" id="bsd_spscwt_shipping_type_<?php echo esc_attr( $variation_id . '_0' ); ?>">
													<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
													<option value="percentage"><?php echo esc_html( 'Percentage' ); ?></option>
													<option value="amount"><?php echo esc_html( 'Fixed Amount' ); ?></option>
												</select>

												<div class="edit-form-btns prod_selected_st_btns">
													<button class="edit-form-ok-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
													<button class="edit-form-cancle-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
												</div>
											</div>

											<div class="selected_shipping_type_wrapper"></div>
										</td>

										<td class="prod_stv_td_wrapper edit-item-parent">


											<a href="javascript:void(0);" class="edit-item selected_stv_value_wrapper" data-connected_account_index="<?php echo esc_attr( $variation_id . '_0' ); ?>"><img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/edit.svg" alt="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" title="<?php esc_attr_e( 'Edit', 'bsd-split-pay-stripe-connect-woo' ); ?>" /></a>
											<div class="edit-form">
												<input type='number' min='0' max="100" step=".01" id='bsd_prod_shipping_percentage_<?php echo esc_attr( $variation_id . '_0' ); ?>' name='bsd_prod_shipping_percentage[<?php echo (int) $variation_id; ?>][0]' value="" placeholder="e.g. 10" class="bsd_spscwtp_shipping_input" />
												<input type='number' min='0' step=".01" id='bsd_prod_shipping_amount_<?php echo esc_attr( $variation_id . '_0' ); ?>' name='bsd_prod_shipping_amount[<?php echo (int) $variation_id; ?>][0]' value="" placeholder="e.g. 20" class="bsd_spscwt_shipping_amount bsd_hidden" />
												<div class="edit-form-btns prod_stv_btns">
													<button class="edit-form-ok-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/tick-s.svg" alt="tick" title="<?php esc_attr_e( 'Submit', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
													<button class="edit-form-cancle-btn" type="button">
														<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/cross-s.svg" alt="cross" title="<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>" />
													</button>
												</div>
											</div>

											<div class="selected_shipping_digit_wrapper"></div>
										</td>
										<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( implode( ', ', $cat_name ) ); ?></td>
										<td class="<?php echo ( $odd_even % 2 == 1 ) ? 'cream-dark' : 'pink-dark'; ?>"><?php echo esc_html( $variation['sku'] ); ?></td>
									</tr>

									<?php
								}
								++$variation_td_counter;
								
								
							}

							?>

						<?php } ?>


					<?php } ?>

					<?php
					++$odd_even;
				endwhile;
				// @phpstan-ignore-next-line — WP_Query loop semantics confuse the analyser; cleanup is intentional.
				wp_reset_query();
				// @phpstan-ignore-next-line
				wp_reset_postdata();
				?>
			</table>

		</div>

		<!-- The Modal -->
		<div id="connect_stripe_account_modal_id" class="sps-modal" role="dialog" aria-modal="true" tabindex="-1">

			<!-- Modal content -->
			<div class="sps-modal-content">
				<div class="sps-modal-header">
					<span class="close close_connect_stripe_account_modal_btn">&times;</span>
					<h2><?php esc_attr_e( 'Bulk Edit Connected Stripe Account', 'bsd-split-pay-stripe-connect-woo' ); ?></h2>
				</div>
				<div class="sps-modal-body">
					<p>
						<?php esc_attr_e( 'This will change to all row\'s connected stripe account.', 'bsd-split-pay-stripe-connect-woo' ); ?>
					</p>
					<label for="bulk_connect_stripe_account"><?php esc_attr_e( 'Connected Stripe Account', 'bsd-split-pay-stripe-connect-woo' ); ?></label>
					<select name="bulk_connect_stripe_account" id="bulk_connect_stripe_account" class="bulk_connect_stripe_account">
						<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
						<?php
							if ( ! empty( $get_accounts ) ) {
								foreach ( $get_accounts as $gak ) {
									?>
									<option value="<?php echo esc_attr( $gak['bsd_account_id'] ); ?>"><?php echo esc_html( empty( $gak['bsd_account_name'] ) ? $gak['bsd_account_id'] : $gak['bsd_account_name'] ); ?></option>
									<?php
								}
							}
						?>
					</select>
				</div>

				<div class="sps-modal-footer">
					<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/popup-loader.svg" class="popup-loader" />
					<button class="button button-primary apply_change_btn" type="button">
						<?php esc_attr_e( 'Apply', 'bsd-split-pay-stripe-connect-woo' ); ?>
					</button>
					<button class="button button-secondary cancel_change_btn" type="button">
						<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>
					</button>
				</div>
					
				
			</div>

		</div>

		<!-- The Modal -->
		<div id="account_transfer_type_modal_id" class="sps-modal" role="dialog" aria-modal="true" tabindex="-1">

			<!-- Modal content -->
			<div class="sps-modal-content">
				<div class="sps-modal-header">
					<span class="close close_account_transfer_type_modal_btn">&times;</span>
					<h2><?php esc_attr_e( 'Bulk Edit Transfer Type column value', 'bsd-split-pay-stripe-connect-woo' ); ?></h2>
				</div>
				<div class="sps-modal-body">
					<p>
						<?php esc_attr_e( 'This will change to all row\'s Transfer Type column value.', 'bsd-split-pay-stripe-connect-woo' ); ?>
					</p>
					<label for="bulk_transfer_type"><?php esc_attr_e( 'Account Transfer Type', 'bsd-split-pay-stripe-connect-woo' ); ?></label>
					
					<select name="bulk_transfer_type" class="bulk_transfer_type" id="bulk_transfer_type">
						<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
						<option value="percentage"><?php echo esc_html__( 'Percentage', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
						<option value="amount"><?php echo esc_html__( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
					</select>
				</div>

				<div class="sps-modal-footer">
					
					<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/popup-loader.svg" class="popup-loader" />

					<button class="button button-primary transfer_type_apply_change_btn" type="button">
						<?php esc_attr_e( 'Apply', 'bsd-split-pay-stripe-connect-woo' ); ?>
					</button>
					<button class="button button-secondary transfer_type_cancel_change_btn" type="button">
						<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>
					</button>
				</div>
					
				
			</div>

		</div>

		<!-- The Modal -->
		<div id="account_transfer_value_modal_id" class="sps-modal" role="dialog" aria-modal="true" tabindex="-1">

			<!-- Modal content -->
			<div class="sps-modal-content">
				<div class="sps-modal-header">
					<span class="close close_account_transfer_value_modal_btn">&times;</span>
					<h2><?php esc_attr_e( 'Bulk Edit Transfer value column', 'bsd-split-pay-stripe-connect-woo' ); ?></h2>
				</div>
				<div class="sps-modal-body">
					<p>
						<?php esc_attr_e( 'This will change to all row\'s Transfer Value column value.', 'bsd-split-pay-stripe-connect-woo' ); ?>
					</p>
					<label for="bulk_transfer_value"><?php esc_attr_e( 'Transfer Value', 'bsd-split-pay-stripe-connect-woo' ); ?></label>
					
					<input type='number' min='1'  step=".01" id='bulk_transfer_value' name='bulk_transfer_value' placeholder="e.g. 10" class="bulk_transfer_value" />
				</div>

				<div class="sps-modal-footer">
					<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/popup-loader.svg" class="popup-loader" />
					<button class="button button-primary transfer_value_apply_change_btn" type="button">
						<?php esc_attr_e( 'Apply', 'bsd-split-pay-stripe-connect-woo' ); ?>
					</button>
					<button class="button button-secondary transfer_value_cancel_change_btn" type="button">
						<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>
					</button>
				</div>
					
				
			</div>

		</div>


		<!-- The Modal -->
		<div id="shipping_transfer_type_modal_id" class="sps-modal" role="dialog" aria-modal="true" tabindex="-1">

			<!-- Modal content -->
			<div class="sps-modal-content">
				<div class="sps-modal-header">
					<span class="close close_shipping_transfer_type_modal_btn">&times;</span>
					<h2><?php esc_attr_e( 'Bulk Edit Transfer value column', 'bsd-split-pay-stripe-connect-woo' ); ?></h2>
				</div>
				<div class="sps-modal-body">
					<p>
						<?php esc_attr_e( 'This will change to all row\'s Shipping Transfer Type column value.', 'bsd-split-pay-stripe-connect-woo' ); ?>
					</p>
					<label for="shipping_bulk_transfer_type"><?php esc_attr_e( 'Shipping Transfer Type', 'bsd-split-pay-stripe-connect-woo' ); ?></label>
					
					<select name="shipping_bulk_transfer_type" class="shipping_bulk_transfer_type" id="shipping_bulk_transfer_type">
						<option value=""><?php esc_attr_e( 'Select', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
						<option value="percentage"><?php echo esc_html__( 'Percentage', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
						<option value="amount"><?php echo esc_html__( 'Fixed Amount', 'bsd-split-pay-stripe-connect-woo' ); ?></option>
					</select>
				</div>

				<div class="sps-modal-footer">
					<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/popup-loader.svg" class="popup-loader" />
					<button class="button button-primary shipping_transfer_type_apply_change_btn" type="button">
						<?php esc_attr_e( 'Apply', 'bsd-split-pay-stripe-connect-woo' ); ?>
					</button>
					<button class="button button-secondary shipping_transfer_type_cancel_change_btn" type="button">
						<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>
					</button>
				</div>
					
				
			</div>

		</div>

		<!-- The Modal -->
		<div id="shipping_transfer_value_modal_id" class="sps-modal" role="dialog" aria-modal="true" tabindex="-1">

			<!-- Modal content -->
			<div class="sps-modal-content">
				<div class="sps-modal-header">
					<span class="close close_shipping_transfer_value_modal_btn">&times;</span>
					<h2><?php esc_attr_e( 'Bulk Edit Transfer value column', 'bsd-split-pay-stripe-connect-woo' ); ?></h2>
				</div>
				<div class="sps-modal-body">
					<p>
						<?php esc_attr_e( 'This will change to all row\'s Shipping Transfer Value column value.', 'bsd-split-pay-stripe-connect-woo' ); ?>
					</p>
					<label for="shipping_bulk_transfer_value"><?php esc_attr_e( 'Shipping Transfer Value', 'bsd-split-pay-stripe-connect-woo' ); ?></label>
					
					<input type='number' min='1'  step=".01" id='shipping_bulk_transfer_value' name='shipping_bulk_transfer_value' placeholder="e.g. 10" class="shipping_bulk_transfer_value" />
					
				</div>

				<div class="sps-modal-footer">
					<img src="<?php echo esc_url( SPP_PLUGIN_URI ); ?>assets/popup-loader.svg" class="popup-loader" />
					<button class="button button-primary shipping_transfer_value_apply_change_btn" type="button">
						<?php esc_attr_e( 'Apply', 'bsd-split-pay-stripe-connect-woo' ); ?>
					</button>
					<button class="button button-secondary shipping_transfer_value_cancel_change_btn" type="button">
						<?php esc_attr_e( 'Cancel', 'bsd-split-pay-stripe-connect-woo' ); ?>
					</button>
				</div>
					
				
			</div>

		</div>


		<div class="our-pro-bar">
			<button class="n-btn save-bulk-edit" type="submit"><?php echo esc_html__( 'Save Changes', 'bsd-split-pay-stripe-connect-woo' ); ?></button>
			<?php
			if ( ! empty( $pages ) && is_array( $pages ) ) {
				$paged = ( get_query_var( 'paged' ) == 0 ) ? 1 : get_query_var( 'paged' );
				echo '<ul class="pagination">';
				foreach ( $pages as $page ) {
					echo wp_kses_post( "<li>$page</li>" );
				}
				echo '</ul>';
			}
			?>
			<div class="result-coutn"><?php echo esc_html( $total_variations . ' variations found in ' . $total_products . ' products' ); ?></div>
			<?php
				$total_text = esc_html( $total_variations . ' variations found in ' . $total_products . ' products' );
			?>
		</div>
	</form>
	<?php
} else { ?>
	<p>No Product Found!</p>
<?php }
$html .= ob_get_contents();
ob_end_clean();
$send_data = array(
	'data' => $html,
	'total_text' => $total_text,
);
// wp_send_json_success() terminates — `die();` was unreachable.
wp_send_json_success( $send_data );
