This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter('wc_session_expiring', 'filter_ExtendSessionExpiring' ); | |
| add_filter('wc_session_expiration' , 'filter_ExtendSessionExpired' ); | |
| function filter_ExtendSessionExpiring($seconds) { | |
| return 60 * 60 * 71; | |
| } | |
| function filter_ExtendSessionExpired($seconds) { | |
| return 60 * 60 * 72; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import csv | |
| with open('wc-product-export-10-5-2023-1683750652005 - wc-product-export-10-5-2023-1683750652005.csv') as csv_file: | |
| csv_reader = csv.reader(csv_file, delimiter=',') | |
| line_count = 0 | |
| for row in csv_reader: | |
| if line_count == 0: | |
| line_count += 1 | |
| else: | |
| col_count = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* remove default WC structured data and add our custom process which adds an id to the script tag and loads the script content via js to avoid caching*/ | |
| function remove_wc_sd_output_footer() { | |
| remove_action( 'wp_footer', array( WC()->structured_data, 'output_structured_data' ), 10 ); | |
| add_action( 'wp_footer', 'custom_structured_data_output_cb', 10 ); | |
| } | |
| add_action( 'init', 'remove_wc_sd_output_footer' ); | |
| function custom_structured_data_output_cb() { | |
| $types = cust_get_data_type_for_page(); |
OlderNewer