Skip to content

Commit

Permalink
fix: module import for apiFetch in Feedzy Block
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Mar 5, 2025
1 parent aa126a3 commit 16e8817
Show file tree
Hide file tree
Showing 2 changed files with 195 additions and 91 deletions.
6 changes: 3 additions & 3 deletions js/FeedzyBlock/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import queryString from 'query-string';
import Inspector from './inspector';
import { __, sprintf } from '@wordpress/i18n';
import { apiFetch as apiRequest } from '@wordpress/api-fetch';
import apiFetch from '@wordpress/api-fetch';
import { Component, Fragment } from '@wordpress/element';
import {
unescapeHTML,
Expand Down Expand Up @@ -128,7 +128,7 @@ class Editor extends Component {
loading: true,
});

apiRequest({
apiFetch({
path: `/feedzy/v1/feed?${url}`,
method: 'POST',
data: this.props.attributes,
Expand Down Expand Up @@ -163,7 +163,7 @@ class Editor extends Component {
}

loadCategories() {
apiRequest({ path: '/wp/v2/feedzy_categories?per_page=100' })
apiFetch({ path: '/wp/v2/feedzy_categories?per_page=100' })
.then((data) => {
if (this.unmounting) {
return data;
Expand Down
Loading

0 comments on commit 16e8817

Please sign in to comment.