Mostrar precios en WooCommerce con y sin impuestos php

View Snippet
                    <?php
/* Precios con y sin impuestos */
add_filter('woocommerce_get_price_suffix', 'nwp_precios_con_y_sin_impuestos', 99, 4);

function nwp_precios_con_y_sin_impuestos($suffix, $product, $price, $qty) {
    $suffix = ' <small>sin IVA</small> - '.wc_price(wc_get_price_including_tax($product)).
    ' <small>con IVA</small>';
    return $suffix;
}
                  

Permite archivos SVG php

View Snippet
                    <?php
//* allow SVG
	function def_allow_svgimg_types($mimes) {
	  $mimes['svg'] = 'image/svg+xml';
	  return $mimes;
	}
	add_filter('upload_mimes', 'def_allow_svgimg_types');
	add_filter( 'wp_check_filetype_and_ext', function($def_svg_filetype_ext_data, $file, $filename, $mimes) {
		if ( substr($filename, -4) === '.svg' ) {
			$def_svg_filetype_ext_data['ext'] = 'svg';
			$def_svg_filetype_ext_data['type'] = 'image/svg+xml';
		}
		return $def_svg_filetype_ext_data;
	}, 100, 4 );
	function def_common_svg_media_thumbnails($response, $attachment, $meta){
		if($response['type'] === 'image' && $response['subtype'] === 'svg+xml' && class_exists('SimpleXMLElement'))
		{
		  try {
		      $path = get_attached_file($attachment->ID);
		      if(@file_exists($path))
		      {
		          $svg = new SimpleXMLElement(@file_get_contents($path));
		          $src = $response['url'];
		          $width = (int) $svg['width'];
		          $height = (int) $svg['height'];
		          //media gallery
		          $response['image'] = compact( 'src', 'width', 'height' );
		          $response['thumb'] = compact( 'src', 'width', 'height' );
		          //media single
		          $response['sizes']['full'] = array(
		              'height'        => $height,
		              'width'         => $width,
		              'url'           => $src,
		              'orientation'   => $height > $width ? 'portrait' : 'landscape',
		          );
		      }
		  }
		  catch(Exception $e){}
		}
		return $response;
	}
	add_filter('wp_prepare_attachment_for_js', 'def_common_svg_media_thumbnails', 10, 3);
//* End allow SVG
                  

Background Repeat css

View Snippet
                    /*Hacer que la imagen de fondo se repita pero se ajuste al contenedor
y no corte la imagen*/
.imag-ajuste {
    width: 500px;
    height: 125px;
    border: 1px solid #fff;
    background-image: url('https://www.freeiconspng.com/uploads/pikachu-png-icon-6.png');
    /* Hacer que el contenedor sea resizable
        esto para la prueba
        */
    resize: both;
    overflow: auto;
    /***Propiedad: round
       las imágenes se adaptan estirandose o reduciendose sin que se corten
    ***/   
    /* background-repeat: round;*/
    
    
    /***Propiedad: space
       Adapta la cantidad de imágenes al espacio disponible
    ***/   
    background-repeat: space; 
}
                  

Ocultar Mostrar Condicional Oxygen php

View Snippet
                    <?php
if (function_exists("oxygen_vsb_register_condition")) {
    global $oxy_condition_operators;

    oxygen_vsb_register_condition(
        "Has Results",
        ["options" => ["true", "false"], "custom" => false],
        ["=="],
        "search_has_results_callback",
        "Search"
    );

    function search_has_results_callback($value, $operator)
    {
        global $wp_query;
        $posts_found = $wp_query->found_posts;

        if ($value == "true" && $posts_found > 0) {
            return true;
        } elseif ($value == "false" && $posts_found == 0) {
            return true;
        }
    }
}

                  

WooCommerce Single Product Page Default Actions php

View Snippet
                    /*
This is the list of WooCommerce actions you can unhook/remove by simply changing “add_action” 
to “remove_action” in your functions.php. WooCommerce uses its own hooks e.g.
“woocommerce_before_single_product_summary” to assemble the single product page together. 
Because it’s done this way, you can therefore use “remove_action” to remove one of these elements. 
I’ve also added other “do_action” which don’t have a trigger function at the moment, 
but that you can use for adding content to the product page.
*/
/**
 * @snippet       List of Default Actions @ WooCommerce Single Product
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @updated       WooCommerce 4.0
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */
 
// Before content
add_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );
add_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
add_action( 'woocommerce_before_single_product', 'woocommerce_output_all_notices', 10 );
  
// Left column
add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_sale_flash', 10 );
add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
add_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
 
// Right column
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
 
// Right column - add to cart
do_action( 'woocommerce_before_add_to_cart_form' );
do_action( 'woocommerce_before_add_to_cart_button' );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
 
add_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 );
add_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart', 30 );
add_action( 'woocommerce_variable_add_to_cart', 'woocommerce_variable_add_to_cart', 30 );
add_action( 'woocommerce_external_add_to_cart', 'woocommerce_external_add_to_cart', 30 );
add_action( 'woocommerce_single_variation', 'woocommerce_single_variation', 10 );
add_action( 'woocommerce_single_variation', 'woocommerce_single_variation_add_to_cart_button', 20 );
do_action( 'woocommerce_before_quantity_input_field' );
do_action( 'woocommerce_after_quantity_input_field' );
do_action( 'woocommerce_after_add_to_cart_button' );
do_action( 'woocommerce_after_add_to_cart_form' );
 
// Right column - meta
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
do_action( 'woocommerce_product_meta_start' );
do_action( 'woocommerce_product_meta_end' );
 
// Right column - sharing
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 );
do_action( 'woocommerce_share' );
 
// Tabs, upsells and related products
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
add_action( 'woocommerce_product_additional_information', 'wc_display_product_attributes', 10 );
do_action( 'woocommerce_product_after_tabs' );
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
 
// Reviews
add_action( 'woocommerce_review_before', 'woocommerce_review_display_gravatar', 10 );
add_action( 'woocommerce_review_before_comment_meta', 'woocommerce_review_display_rating', 10 );
add_action( 'woocommerce_review_meta', 'woocommerce_review_display_meta', 10 );
do_action( 'woocommerce_review_before_comment_text', $comment );
add_action( 'woocommerce_review_comment_text', 'woocommerce_review_display_comment_text', 10 );
do_action( 'woocommerce_review_after_comment_text', $comment );
 
// After content
do_action( 'woocommerce_after_single_product' );
do_action( 'woocommerce_after_main_content' );