Title: OilPriceAPI Fuel Widgets
Author: Karl Waldman
Published: <strong>5 ביולי 2026</strong>
Last modified: 19 ביולי 2026

---

חיפוש תוספים

![](https://ps.w.org/oilpriceapi-widgets/assets/banner-772x250.png?rev=3613705)

![](https://ps.w.org/oilpriceapi-widgets/assets/icon-256x256.png?rev=3597074)

# OilPriceAPI Fuel Widgets

 מאת [Karl Waldman](https://profiles.wordpress.org/kwaldman/)

[הורדה](https://downloads.wordpress.org/plugin/oilpriceapi-widgets.1.1.1.zip)

 * [פרטים](https://he.wordpress.org/plugins/oilpriceapi-widgets/#description)
 * [סקירות](https://he.wordpress.org/plugins/oilpriceapi-widgets/#reviews)
 *  [התקנה](https://he.wordpress.org/plugins/oilpriceapi-widgets/#installation)
 * [פיתוח](https://he.wordpress.org/plugins/oilpriceapi-widgets/#developers)

 [תמיכה](https://wordpress.org/support/plugin/oilpriceapi-widgets/)

## תיאור

OilPriceAPI Fuel Widgets adds source-dated U.S. retail-fuel data to WordPress as
shortcodes or a Gutenberg block.

#### Fuel Price Ticker

National U.S. diesel and regular gasoline averages. Each result shows its EIA observation
week, weekly cadence, unit, and source.

#### U.S. Diesel Price

The national U.S. diesel retail average, quoted in USD per gallon and labeled with
its observation week.

#### Fuel Surcharge Calculator

Calculates the percentage by which the weekly national diesel average exceeds a 
base price configured by the site owner. It does not describe the result as an industry
standard or a contractual surcharge.

#### Features

 * Source date, weekly cadence, currency, unit, and EIA attribution in every successful
   widget
 * Dark and light themes
 * Shortcodes and Gutenberg block
 * Server-side requests with no remote executable code
 * One-hour validated cache
 * Last successful result for up to 48 hours after an error, visibly labeled as 
   a cached copy
 * Fail-closed handling for unavailable, rate-limited, timed-out, empty, or malformed
   responses
 * No API key required for the public EIA series

### External service

This plugin uses OilPriceAPI to retrieve the EIA retail-fuel series displayed by
the widgets.

The WordPress server sends a GET request to `https://www.oilpriceapi.com/api/widgets/
fuel-prices` at most once per hour while a page containing a widget is requested.
OilPriceAPI receives the site server's IP address and standard HTTP request metadata.
The plugin does not send the visitor's IP address, WordPress user data, page content,
or an API credential.

The underlying retail-fuel observations come from the [U.S. Energy Information Administration](https://www.eia.gov/petroleum/gasdiesel/)
and are public domain at the source. OilPriceAPI delivers and validates the response;
it does not grant rights in underlying data.

 * [OilPriceAPI privacy policy](https://www.oilpriceapi.com/privacy)
 * [OilPriceAPI terms](https://www.oilpriceapi.com/terms)
 * [OilPriceAPI service status](https://status.oilpriceapi.com/)

## בלוקים

תוסף זה מספק בלוק 1.

 *   OilPriceAPI Widget Embed source-dated weekly U.S. fuel prices or a fuel surcharge
   calculator.

## התקנה

 1. Upload the `oilpriceapi-widgets` folder to `/wp-content/plugins/`.
 2. Activate **OilPriceAPI Fuel Widgets** through the Plugins screen.
 3. Add an OilPriceAPI block or one of the shortcodes below to a page.

#### Quick Start

 * `[oilpriceapi_ticker]` – weekly national diesel and gasoline prices
 * `[oilpriceapi_diesel]` – weekly national diesel price
 * `[oilpriceapi_fuel_surcharge base_price="2.50"]` – percentage above the configured
   base

Configure default theme, fuels, and base price under **Settings > OilPriceAPI**.

## שאלות נפוצות

### Do I need an API key?

No. These widgets use a public OilPriceAPI route restricted to two EIA public-domain
retail-fuel series.

### How current is the data?

EIA publishes these retail-fuel series weekly. Every successful widget shows the
source observation as `Week of` followed by a date and says `Updated weekly`.

### What happens if the service is unavailable?

The plugin can show its last successful response for up to 48 hours. That state 
is visibly labeled `Cached copy; service temporarily unavailable`. After 48 hours,
the price is removed and the widget links to the service status page.

### What does the plugin cache?

Only the validated fuel-price payload, its EIA source date, and the time it was 
retrieved. The fresh cache lasts one hour. The last-success cache lasts no more 
than 48 hours.

### Can I display crude oil or natural gas prices?

Not with this public widget. OilPriceAPI does not hold downstream display or redistribution
rights for the crude and natural-gas inputs previously shown by the ticker. Review
the [data-use guidance](https://www.oilpriceapi.com/docs/redistribution) before 
publishing API data to third parties.

### What happened to the carbon calculator and regional diesel display?

Version 1.1 retired the carbon calculator's uncleared crude-price input and removed
unsupported regional diesel output. An existing carbon shortcode shows a retirement
notice instead of silently displaying a fabricated or uncleared value.

### Where can developers get programmatic access?

See the [API documentation](https://docs.oilpriceapi.com/) and the official [PHP SDK](https://packagist.org/packages/oilpriceapi/oilpriceapi).

## סקירות

There are no reviews for this plugin.

## מפתחים

"OilPriceAPI Fuel Widgets" הוא תוסף קוד פתוח. האנשים הבאים תרמו ליצירת התוסף הזה.

תורמים

 *   [ Karl Waldman ](https://profiles.wordpress.org/kwaldman/)
 *   [ oilpriceapi ](https://profiles.wordpress.org/oilpriceapi/)

[ניתן לתרגם את "OilPriceAPI Fuel Widgets" לשפה שלך.](https://translate.wordpress.org/projects/wp-plugins/oilpriceapi-widgets)

### מעוניינים בפיתוח?

[עיינו בקוד](https://plugins.trac.wordpress.org/browser/oilpriceapi-widgets/), ראו
את הקוד ב-[SVN repository](https://plugins.svn.wordpress.org/oilpriceapi-widgets/),
או הירשמו ל[לוג פיתוח](https://plugins.trac.wordpress.org/log/oilpriceapi-widgets/)
באמצעות [RSS](https://plugins.trac.wordpress.org/log/oilpriceapi-widgets/?limit=100&mode=stop_on_copy&format=rss).

## שינויים

#### 1.1.1

 * Matched the package folder and text domain to the approved WordPress.org directory
   slug `oilpriceapi-widgets`

#### 1.1.0

 * Replaced crude and natural-gas public display with allowlisted EIA diesel and
   gasoline series
 * Added visible source date, weekly cadence, unit, and EIA attribution
 * Moved rendering server-side and removed remote executable widget scripts
 * Added strict response validation and fail-closed recovery states
 * Added one-hour fresh caching and an explicitly labeled 48-hour last-success fallback
 * Retired the carbon widget's uncleared crude-price dependency
 * Removed unsupported regional diesel output and unsupported marketing claims
 * Added deterministic failure-path tests and CI

#### 1.0.1

 * Confirmed WordPress compatibility and expanded directory documentation

#### 1.0.0

 * Initial plugin release

## מטא

 *  גרסה: **1.1.1**
 *  Last updated **לפני 7 שעות**
 *  Active installations **פחות מ-10**
 *  WordPress version ** 6.0 ומעלה **
 *  Tested up to **7.0.2**
 *  PHP version ** 7.4 ומעלה **
 *  שפה
 * [English (US)](https://wordpress.org/plugins/oilpriceapi-widgets/)
 * Tags
 * [fuel surcharge](https://he.wordpress.org/plugins/tags/fuel-surcharge/)[widget](https://he.wordpress.org/plugins/tags/widget/)
 *  [תצוגה מתקדמת](https://he.wordpress.org/plugins/oilpriceapi-widgets/advanced/)

## דרוגים

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/oilpriceapi-widgets/reviews/#new-post)

[הצג הכל](https://wordpress.org/support/plugin/oilpriceapi-widgets/reviews/)

## תורמים

 *   [ Karl Waldman ](https://profiles.wordpress.org/kwaldman/)
 *   [ oilpriceapi ](https://profiles.wordpress.org/oilpriceapi/)

## תמיכה

יש לך משהו לומר? זקוק לעזרה?

 [פורום תמיכה](https://wordpress.org/support/plugin/oilpriceapi-widgets/)