• So I am investigating in all the optimization tasks we can do for a customer.
    I see in backend that in any backend page the settings for feedaty are loaded:

    			// Create filter for listing hooks inside product page, this list can be expanded in funkctions.php
    			add_filter( $this->plugin_name . '_product_badge_hooks', array ( $this, 'product_badge_hooks' ) );
    			// Create filter for importing legacy settings
    			add_filter( "{$this->plugin_name}_heritage", array ( $this, 'heritage' ) );
    			
    			// Retrieve plugin options and apply legacy settings
    			$this->options = apply_filters( "{$this->plugin_name}_heritage", get_option( $this->plugin_name ) );

    in class-feedaty-rating-for-woocommerce-admin.php
    There is this code that is executed in every page but this should be executed only in the Product list.

    A check with a code like this:
    if( isset($_GET['post_type']) && $_GET['post_type']==='product' ) {
    It is enough as that those filter are needed in the product post type not in articles as example…

  • The topic ‘option loaded in any backend page’ is closed to new replies.