• Resolved vendidero

    (@vendidero)


    Hi there,

    in class-wcml-endpoints.php method maybe_flush_rules you are currently flushing rewrite rules like that:

    function maybe_flush_rules(){
            if( get_option( 'flush_rules_for_endpoints_translations' ) ){
                WC()->query->init_query_vars();
                WC()->query->add_endpoints();
                flush_rewrite_rules();
                delete_option( 'flush_rules_for_endpoints_translations' );
            }
        }

    This leads to the problem that no custom endpoints can be registered because neither init_query_vars nor add_endpoints of WC_Query is filterable leading to 404 errors. You may register an action in this method or search for a better solution.

    cheers

    https://wordpress.org/plugins/woocommerce-multilingual/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Andreas Panag

    (@andrewp-2)

    Thank you very much for pointing this to us.

    Please give us some time to look on this and I will reply to you soon.

    Thank you very much again.

    Plugin Contributor Andreas Panag

    (@andrewp-2)

    Hello again and I am sorry for being late.

    Can you please which hook do you use to register endpoints?

    We have already in our code a hook for custom endpoints :

    wcml_register_endpoints_query_vars

    with arguments : endpoints array, wc default endpoints, WCML_Endpoints object.

    Thanks in advanced

    Plugin Contributor Andreas Panag

    (@andrewp-2)

    I am closing this ticket. If something change we will check it again.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Endpoint rewrite rules’ is closed to new replies.