important;"; } $options = $args['options']; $product = $args['product']; $attribute = $args['attribute']; $name = $args['name'] ? $args['name'] : 'attribute_' . sanitize_title( $attribute ); $id = $args['id'] ? $args['id'] : sanitize_title( $attribute ); $class = $args['class']; if ( empty( $options ) && ! empty( $product ) && ! empty( $attribute ) ) { $attributes = $product->get_variation_attributes(); $options = $attributes[ $attribute ]; } echo ''; } /** * Output a list of variation attributes for use in the cart forms. * * @param array $args * @since 2.4.0 */ function wcva_dropdown_variation_attribute_options2( $args = array() ) { $args = wp_parse_args( $args, array( 'options' => false, 'attribute' => false, 'product' => false, 'selected' => false, 'name' => '', 'id' => '', 'class' => '', 'show_option_none' => esc_html__( 'Choose an option', 'woocommerce' ) ) ); $options = $args['options']; $product = $args['product']; $attribute = $args['attribute']; $name = $args['name'] ? $args['name'] : 'attribute_' . sanitize_title( $attribute ); $id = $args['id'] ? $args['id'] : sanitize_title( $attribute ); $class = $args['class']; if ( empty( $options ) && ! empty( $product ) && ! empty( $attribute ) ) { $attributes = $product->get_variation_attributes(); $options = $attributes[ $attribute ]; } echo ''; } /** * This function determines weather plugin should load shop swatches js/css file on current page. * Since version 2.2.2 * Used in Classes/class_shop_page_swatchs.php */ function wcva_load_shop_page_assets() { $load_assests = "no"; if (is_cart() || is_product() || is_shop() || (is_product_category()) || is_product_tag() || is_page() || is_tax("pwb-brand") || is_tax("product-collection")) { $load_assests = "yes"; } else { $load_assests = "no"; } return $load_assests; } ?>