Hi to all i want to ask something about wordpress api!
I have one button in my vue when clicked fire a function who run an axios get request and fetch me the value of one field in specifiec post!
handleController(){
axios.get('https://nice-ardinghelli.185-4-133-211.plesk.page/admin/wp-json/wp/v2/teams/'+this.team.id)
.then(response => {
this.isControllerSet = response.data.acf.acf_team_controller
console.log(this.isControllerSet)
})
},
Here is the wordpress backend
And here is the console.log result if i hit the button
The problem is:
- When wordpress backend user update the value of the field the vue app don't fetch me the new value until i hit ctrl + f5. If i hard refresh i get the new value. How can i fetch always the new value when button clicked without hard refresh?
Here is the wordpress user update the value
And here is the console.log result if i hit the button
- When i POST data with axios and update this field it happens the same as above i don't get the fresh data until i hard refresh(CTRL + F5) my vue app