Automattic\WooCommerce\Internal\ProductGallery

ProductMediaGallery::get_video_position_offset │ private static │ WC 1.0

Get the positional offset used when composing videos into product media.

Method of the class: ProductMediaGallery{}

No Hooks.

Returns

int.

Usage

$result = ProductMediaGallery::get_video_position_offset( $product, $include_product_image, $context ): int;
$product(WC_Product) (required)
Product object.
$include_product_image(true|false) (required)
Whether the product image is included.
$context(string) (required)
Product read context.

ProductMediaGallery::get_video_position_offset() code WC 11.1.2

private static function get_video_position_offset( WC_Product $product, bool $include_product_image, string $context ): int {
	return $include_product_image && absint( $product->get_image_id( $context ) ) ? 1 : 0;
}