Endpoint rewrite rules
-
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
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Endpoint rewrite rules’ is closed to new replies.