Fix lỗi dư chữ Span trong đơn hàng WordPress WooCommerce

Fix lỗi dư chữ Span trong đơn hàng WordPress WooCommerce

				
					<?php
/**
 * Plugin Name: VAHOVA fix variable products
 * Plugin URI: https://vahova.net
 * Description: Plugin này để fix lỗi thuộc tính sản phẩm thừa <span>
 * Version: 1.0
 * Author: VAHOVA
 * Author URI: https://vahova.net/me
 * License: A "Slug" license name e.g. GPL2
 */
 
/*  Copyright YEAR  PLUGIN_AUTHOR_NAME  (email : PLUGIN AUTHOR EMAIL)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License, version 2, as 
    published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

// Start writing code after this line!
add_filter( 'woocommerce_product_variation_title', 'filter_product_variation_title_callback', 10, 4 ); function filter_product_variation_title_callback( $variation_title, $product, $title_base, $title_suffix ) { $title_base = strip_tags($variation_title); return $title_base; }