Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/woocomme.../src/Blocks/Utils
File: ProductDataUtils.php
<?php
[0] Fix | Delete
declare(strict_types=1);
[1] Fix | Delete
namespace Automattic\WooCommerce\Blocks\Utils;
[2] Fix | Delete
[3] Fix | Delete
/**
[4] Fix | Delete
* Utility class to get product data consumable by the blocks.
[5] Fix | Delete
*
[6] Fix | Delete
* @internal
[7] Fix | Delete
*/
[8] Fix | Delete
class ProductDataUtils {
[9] Fix | Delete
/**
[10] Fix | Delete
* Get the product data.
[11] Fix | Delete
*
[12] Fix | Delete
* @param \WC_Product $product Product object.
[13] Fix | Delete
* @return array The product data.
[14] Fix | Delete
*/
[15] Fix | Delete
public static function get_product_data( \WC_Product $product ) {
[16] Fix | Delete
return array(
[17] Fix | Delete
'price_html' => $product->get_price_html(),
[18] Fix | Delete
);
[19] Fix | Delete
}
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function