diegpl
Forum Replies Created
-
I see, but if I set just one key for all websites it will not work then? For sure? Because this would speed things up a lot 🙂
Please, also fix this one: “Return type of MercadoPago\PP\Sdk\Common\AbstractCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice” in wp-content/plugins/woocommerce-mercadopago/packages/sdk/src/Common/AbstractCollection.php:64 changing this:
public function getIterator() { return new \ArrayIterator($this->collection); }for
public function getIterator(): \Traversable { return new \ArrayIterator($this->collection); }stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated
- wp-content/plugins/google-site-kit/includes/Core/REST_API/REST_Routes.php:69
stripos()
wp-content/plugins/google-site-kit/includes/Core/REST_API/REST_Routes.php:69Google\S\C\R\REST_Routes->Google\S\C\R\{closure}()
wp-includes/class-wp-hook.php:308apply_filters('query_vars')
wp-includes/class-wp.php:299WP->parse_request()
wp-includes/class-wp.php:780WP->main()
wp-includes/functions.php:1334wp()
wp-blog-header.php:16
Please, change this code:
$unset_vars = ( $wp->request && stripos( $wp->request, trailingslashit( rest_get_url_prefix() ) . self::REST_ROOT ) !== false ) // Check regular permalinks. || ( empty( $wp->request ) && stripos( $this->context->input()->filter( INPUT_GET, 'rest_route' ), self::REST_ROOT ) !== false ); // Check plain permalinks.For this one as well:
$unset_vars = ( $wp->request && stripos( (string) $wp->request, trailingslashit( rest_get_url_prefix() ) . self::REST_ROOT ) !== false ) // Check regular permalinks. || ( empty( $wp->request ) && stripos( (string) $this->context->input()->filter( INPUT_GET, 'rest_route' ), self::REST_ROOT ) !== false ); // Check plain permalinks.Tks! 😉
Forum: Plugins
In reply to: [WooCommerce] Cart initializing for superadmin querying many rowsWe could improve that getting just the meta_key value as _woocommerce_persistent_cart_websiteid, right? 🙂
Forum: Plugins
In reply to: [WooCommerce] Cart initializing for superadmin querying many rowsActually, the best approach would be to improve the query generated by the function, right? Tks! 😉
SELECT umeta_id as meta_id, meta_key, meta_value FROM wp_usermeta WHERE user_id = 1 ORDER BY umeta_id- This reply was modified 2 years, 11 months ago by diegpl.
You can use Query Monitor plugin to check it out 😉
Forum: Plugins
In reply to: [WooCommerce] Query wc_admin_notes table everywhereSome other not needed queries I prevented commenting these lines in woocommerce/src/Internal/Admin/Notes/WooSubscriptionsNotes.php line 39
public function __construct() { //add_action( 'admin_init', array( $this, 'admin_init' ) ); //add_action( 'update_option_woocommerce_helper_data', array( $this, 'update_option_woocommerce_helper_data' ), 10, 2 ); }Forum: Plugins
In reply to: [WooCommerce] Query wc_admin_notes table everywhereJust if I comment this lines in Notes.php some of the not needed queries are gone:
public static function init() { //add_action( 'admin_init', array( __CLASS__, 'schedule_unsnooze_notes' ) ); //add_action( 'admin_init', array( __CLASS__, 'possibly_delete_survey_notes' ) ); //add_action( 'update_option_woocommerce_show_marketplace_suggestions', array( __CLASS__, 'possibly_delete_marketing_notes' ), 10, 2 ); }Forum: Plugins
In reply to: [WooCommerce] Query wc_admin_notes table everywhereThe function is in woocommerce/src/Admin/Notes/Notes.php
/** * Delete actioned survey notes. */ public static function possibly_delete_survey_notes() { $data_store = self::load_data_store(); $note_ids = $data_store->get_note_ids_by_type( Note::E_WC_ADMIN_NOTE_SURVEY ); foreach ( $note_ids as $note_id ) { $note = self::get_note( $note_id ); if ( $note && ( $note->get_status() === Note::E_WC_ADMIN_NOTE_ACTIONED ) ) { $note->set_is_deleted( 1 ); $note->save(); } } }I tried this code to prevent that with no success:
function prevent_possibly_delete_survey_notes() { remove_action( 'admin_init', array( 'Automattic\W\A\N\Notes', 'possibly_delete_survey_notes' ), PHP_INT_MAX ); } add_action( 'admin_init', 'prevent_possibly_delete_survey_notes' );Forum: Plugins
In reply to: [W3 Total Cache] Header cart not updating at home if Browser Cache is enabledThis code run, but did not solve the issue:
function dndstudio_refresh_header_cart_partials( WP_Customize_Manager $wp_customize ) { if ( ! isset( $wp_customize->selective_refresh ) ) { return; } // Cart $wp_customize->selective_refresh->add_partial( 'header-cart', array( 'selector' => '.cart-item', 'container_inclusive' => true, 'settings' => array('cart_icon','header_cart_style','cart_icon_style','custom_cart_icon','header_cart_total','header_cart_title','html_cart_header'), 'render_callback' => function() { mclude('template-parts/header/partials/element-cart.php'); }, ) ); // Cart $wp_customize->selective_refresh->add_partial( 'header-cart', array( 'selector' => '.header-nav .cart-item', 'container_inclusive' => true, 'settings' => array('cart_icon','header_cart_style','cart_icon_style','custom_cart_icon','header_cart_total','header_cart_title','html_cart_header'), 'render_callback' => function() { mclude('template-parts/header/partials/element-cart.php'); }, ) ); $wp_customize->selective_refresh->add_partial( 'header-cart-mobile', array( 'selector' => '.mobile-nav .cart-item', 'container_inclusive' => true, 'settings' => array('cart_icon','header_cart_style','cart_icon_style','custom_cart_icon','header_cart_total','header_cart_title','html_cart_header'), 'render_callback' => function() { mclude('template-parts/header/partials/element-cart-mobile.php'); }, ) ); } add_action( 'customize_register', 'dndstudio_refresh_header_cart_partials' );Forum: Plugins
In reply to: [W3 Total Cache] Header cart not updating at home if Browser Cache is enabledTo get the template-parts cart files, Flatsome is using this code. How could I implement the mclude on it?
function dndstudio_refresh_header_cart_partials( WP_Customize_Manager $wp_customize ) { if ( ! isset( $wp_customize->selective_refresh ) ) { return; } // Cart $wp_customize->selective_refresh->add_partial( 'header-cart', array( 'selector' => '.cart-item', 'container_inclusive' => true, 'settings' => array('cart_icon','header_cart_style','cart_icon_style','custom_cart_icon','header_cart_total','header_cart_title','html_cart_header'), 'render_callback' => function() { get_template_part('template-parts/header/partials/element','cart'); }, ) ); // Cart $wp_customize->selective_refresh->add_partial( 'header-cart', array( 'selector' => '.header-nav .cart-item', 'container_inclusive' => true, 'settings' => array('cart_icon','header_cart_style','cart_icon_style','custom_cart_icon','header_cart_total','header_cart_title','html_cart_header'), 'render_callback' => function() { get_template_part('template-parts/header/partials/element','cart'); }, ) ); $wp_customize->selective_refresh->add_partial( 'header-cart-mobile', array( 'selector' => '.mobile-nav .cart-item', 'container_inclusive' => true, 'settings' => array('cart_icon','header_cart_style','cart_icon_style','custom_cart_icon','header_cart_total','header_cart_title','html_cart_header'), 'render_callback' => function() { get_template_part('template-parts/header/partials/element','cart-mobile'); }, ) ); } add_action( 'customize_register', 'dndstudio_refresh_header_cart_partials' );Forum: Plugins
In reply to: [W3 Total Cache] Header cart not updating at home if Browser Cache is enabledFlatsome cart is in template-parts/header/partials/element-cart.php file. Should I wrap all its code with
<!-- mfunc mysecurestring -->Or I also can use
<!-- mclude mysecurestring -->to include the file instead to use the mfunc? Is that how it works in order to get it done? Tks! 😉
Forum: Plugins
In reply to: [W3 Total Cache] Header cart not updating at home if Browser Cache is enabledI have done what you said and it worked, but the page is much slower now, although Page Cache is enabled. That was not the expected, right? How can I debug the reason that happened, please? 🙂
So, is the issue solved in this new version? Tks! 🙂
Forum: Plugins
In reply to: [EWWW Image Optimizer] Timeout issue in wpms with many sitesThe plugin is trying to get optimized images data from the whole network in the settings panel top. That is why the issue is happening.