function woo_product_tab_edits( $tabs ) {
// to always have the WooCommerce product inquiry tab display
- $tabs['product_inquiry_tab'] = array(
+ $tabs[ 'product_inquiry_tab' ] = array(
'title' => __( 'Enquire', 'woocommerce' ),
- 'priority' => 50,
'callback' => 'woo_product_inquiry_content'
);
- $tabs['intinerary_tab'] = array(
+ $tabs[ 'itinerary_tab' ] = array(
'title' => __('Itinerary', 'woocommerce'),
- 'priorty' => 20,
'callback' => 'woo_itinerary_content'
);
- $tabs['photos_tab'] = array(
+ $tabs[ 'photos_tab' ] = array(
'title' => __('Photos', 'woocommerce'),
- 'priorty' => 5,
'callback' => 'woo_photos_content'
);
- unset( $tabs['reviews']);
- unset( $tabs['additional_information']);
-
- $tabs['description']['priority'] = 10;
+ unset( $tabs[ 'reviews' ]);
+ unset( $tabs[ 'additional_information' ]);
+//
+ $tabs[ 'photos_tab' ][ 'priority' ] = 5;
+ $tabs[ 'description' ][ 'priority' ] = 10;
+ $tabs[ 'itinerary_tab' ][ 'priority' ] = 20;
+ $tabs[ 'html5_video' ][ 'priority' ] = 30;
+ $tabs[ 'product_inquiry_tab' ][ 'priority' ] = 40;
+
return $tabs;
+
}
function woo_product_inquiry_content() {
function woo_itinerary_content() {
global $product;
- echo do_shortcode('[gravityform id="3" title="true" description="true"]');
+ echo the_field('itinerary');
}
+
function woo_photos_content() {
global $product;
foreach( $attachment_ids as $attachment_id )
{
-// //Get URL of Gallery Images - default wordpress image sizes
-// echo $Original_image_url = wp_get_attachment_url( $attachment_id );
$full_url = wp_get_attachment_image_src( $attachment_id, 'full' )[0];
-// echo $medium_url = wp_get_attachment_image_src( $attachment_id, 'medium' )[0];
-// echo $thumbnail_url = wp_get_attachment_image_src( $attachment_id, 'thumbnail' )[0];
-//
-// //Get URL of Gallery Images - WooCommerce specific image sizes
-// echo $shop_thumbnail_image_url = wp_get_attachment_image_src( $attachment_id, 'shop_thumbnail' )[0];
-// echo $shop_catalog_image_url = wp_get_attachment_image_src( $attachment_id, 'shop_catalog' )[0];
-// echo $shop_single_image_url = wp_get_attachment_image_src( $attachment_id, 'shop_single' )[0];
-
- //echo Image instead of URL
-// echo wp_get_attachment_image($attachment_id, 'full');
-// echo wp_get_attachment_image($attachment_id, 'medium');
-// echo wp_get_attachment_image($attachment_id, 'thumbnail');
echo '<div class="product_gallery_images" style="background: url(' . $full_url . ') no-repeat center center; background-size: cover;" ></div>';
-// echo '<div class="product_gallery_images">'. wp_get_attachment_image($attachment_id, 'shop_thumbnail'). '</div>';
-// echo wp_get_attachment_image($attachment_id, 'shop_catalog');
-// echo wp_get_attachment_image($attachment_id, 'shop_single');
}
}
$id = $post->ID;
$product_meta = new WC_Product($id);
$title = $product_meta->get_title();
+ $title = str_replace(' ', '-', $title);
}
if ($title){