How do I add multiple custom menu Woo-commerce my account page?

function pa_custom_endpoint_keys() { global $wpdb; $charset_collate = $wpdb->get_charset_collate(); $phantom_option = $wpdb->prefix . ‘phantom_option’; $phantom_menu = $wpdb->prefix . ‘phantom_menu’; $results=$wpdb->get_results(“select * from $phantom_menu”); $endpointsdata =array(); foreach($results as $row){ $endpointsdata[$row->pa_menu_endpoint] = $row->pa_menu_name; } return $endpointsdata; } add_action( ‘init’, ‘pa_custom_endpoint’ ); function pa_custom_endpoint() { foreach(pa_custom_endpoint_keys() as $endpointkey=>$endpointlable){ add_rewrite_endpoint( $endpointkey, EP_ROOT | EP_PAGES ); flush_rewrite_rules(false); update_option(‘pa_permalinks_flushed’, 1); } } … Read more

Delete row from table using custom endpoint via API

A few things to try… Confirm you are using POST and not GET when hitting the endpoint. Postman could be helpful here. It appears you are testing your endpoint using Pretty Permalinks. Confirm you have Post Name permalink structure setup. This might be the solution to your problem. If that works however you are wanting … Read more