Server IP : 172.67.158.161 / Your IP : 18.118.166.94 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/giankuin/sieuthiweb.com.vn/wp-content/themes/flatsome/inc/woocommerce/ |
Upload File : |
<?php /** * Generate product structured data at later point. * (hook woocommerce_single_product_summary is not always available) */ function flatsome_single_product_custom_structured_data() { if ( ! class_exists( 'WC_Structured_Data' ) ) { return; } $structured_data = WC()->structured_data; if ( ! is_object( $structured_data ) || ! is_a( $structured_data, 'WC_Structured_Data' ) ) { return; } remove_action( 'woocommerce_single_product_summary', [ $structured_data, 'generate_product_data' ], 60 ); add_action( 'woocommerce_after_single_product', [ $structured_data, 'generate_product_data' ], 60 ); } add_action( 'flatsome_before_single_product_custom', 'flatsome_single_product_custom_structured_data' );