trying to send request-body to rest_api custom csp-endpoint

For sure, you are missing required argument permission_callback If you want this endpoint to be public you add it like this: ‘permission_callback’ => ‘__return_true’ It is tricky, because documentation do not tell you directly that this one is required. From version 5.5 you have only debug note that this argument is required. Also in your … Read more

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)