Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Fix für WooCommerce 4.4.0. Quelle: https://github.com/woocommerce/woocommerce/issues/27394#issuecomment-675809919
- Die Datei öffnen: /wp-content/plugins/woocommerce/includes/class-wc-query.php
- In Zeile 376 diese Funktion suchen:
- private function adjust_total_pages() {
- if ( 0 === wc_get_loop_prop( 'total_pages' ) ) {
- wc_set_loop_prop( 'total_pages', $GLOBALS['wp_query']->max_num_pages );
- }
- }
- Die Funktion ersetzen mit:
- private function adjust_total_pages() {
- if ( defined( 'WC_PLUGIN_FILE' ) && ! function_exists( 'wc_get_loop_prop' ) ) {
- $woocommerce_file = dirname( WC_PLUGIN_FILE ) . '/includes/wc-template-functions.php';
- if ( file_exists( $woocommerce_file ) ) {
- require_once $woocommerce_file;
- }
- }
- if ( 0 === wc_get_loop_prop( 'total_pages' ) ) {
- wc_set_loop_prop( 'total_pages', $GLOBALS['wp_query']->max_num_pages );
- }
- }
Add Comment
Please, Sign In to add comment