Oil International Market by M92 is a lightweight WordPress plugin that displays the latest WTI and Brent crude oil prices in a simple front-end widget. It uses Yahoo Finance market data, stores the current and previous fetched prices, and shows a basic trend indicator so visitors can quickly see market movement.


Why Use This Plugin?

  • Displays WTI and Brent crude oil prices in USD per barrel
  • Current + previous prices stored for comparison
  • Trend indicator based on the latest fetched values
  • Lightweight shortcode-based widget for easy placement anywhere on your site
  • Admin status screen under Settings → Oil Market by M92
  • Plugin-scoped CSS classes and a unique function prefix for better compatibility

Oil Market Widget Preview

The front-end widget displays:

  • WTI crude oil price
  • Brent crude oil price
  • Previous stored prices
  • Simple trend indicators
  • Last updated timestamps based on the detected region timezone

Screenshot Placeholder: Add your widget screenshot image here.


Quick Setup

  1. Install the plugin by uploading the oil-international-market-by-m92 folder to /wp-content/plugins/ or upload the ZIP file from Plugins → Add New → Upload Plugin.
  2. Activate it from the Plugins page in WordPress.
  3. Optional: review the plugin status screen under Settings → Oil Market by M92.
  4. Add the shortcode to any page, post, or widget area where you want the oil prices to appear.

Shortcode Usage

Use this shortcode to display the oil market widget:

[oil_international_market]

Legacy shortcode supported for backward compatibility:

[oil_price_widget]

Where you can use it:

  • Pages and posts
  • Widget areas (depending on your theme)
  • Shortcode blocks in Gutenberg

How Often Does It Update?

The plugin attempts to refresh market data approximately every 10 seconds using WP-Cron. Since WP-Cron depends on WordPress activity, the actual refresh timing may vary depending on site traffic and cron execution.

If no cached data is available yet, the plugin may also try to fetch prices:

  • When the plugin is activated
  • When the shortcode is rendered for the first time

Timezone Handling

Displayed timestamps follow the detected region timezone:

  • PK Time uses Asia/Karachi
  • IND Time uses Asia/Kolkata
  • US Time uses the site’s America/* timezone when available, or America/New_York when a U.S. locale is detected

Third-Party Service

This plugin relies on a third-party service to fetch oil market data.

  • Service: Yahoo Finance
  • Service URL: https://finance.yahoo.com/
  • API endpoints used:
    • https://query1.finance.yahoo.com/v8/finance/chart/CL=F
    • https://query1.finance.yahoo.com/v8/finance/chart/BZ=F
  • When requests are made:
    • About every 10 seconds when WP-Cron runs
    • On plugin activation when WordPress can run the initial request
    • On front-end render only if no cached price data is available yet
  • What data is sent: The plugin does not intentionally send visitor-submitted personal data. However, standard HTTP request metadata such as the server IP address, user agent, and request headers may be transmitted by the hosting environment when contacting Yahoo Finance.
  • Why the service is used: To retrieve the latest WTI and Brent crude oil prices.
  • Terms of Service: https://legal.yahoo.com/us/en/yahoo/terms/otos/index.html
  • Privacy Policy: https://legal.yahoo.com/us/en/yahoo/privacy/index.html

Customization & Styling

The plugin includes its own scoped CSS classes, making it easier to style while reducing the chance of conflicts with your theme or other plugins.

Tip: You can add custom styling through Appearance → Customize → Additional CSS or your child theme stylesheet.


Frequently Asked Questions

Which shortcode should I use?

Use [oil_international_market]. For compatibility with older content, [oil_price_widget] also works.

Does this plugin require a third-party service?

Yes. The plugin uses Yahoo Finance to retrieve oil market prices.

Does the plugin send personal data?

No visitor-submitted personal data is intentionally sent by the plugin. However, your server or hosting environment may send standard HTTP request metadata such as IP address, user agent, and headers when requests are made to Yahoo Finance.


Screenshots

  • Front-end oil market widget with WTI and Brent prices
  • Admin status screen with current values, previous values, and third-party service disclosure

Changelog

1.0.3

  • Initial public release as Oil International Market by M92
  • Added a unique m92_oim_ function prefix
  • Updated the plugin slug, main file name, text domain, and asset names
  • Updated the refresh schedule to a 10-second WP-Cron interval
  • Added WordPress.org-ready third-party service disclosure for Yahoo Finance
  • Kept backward compatibility for the legacy [oil_price_widget] shortcode

License

This plugin is licensed under GPLv2 or later.


Disclaimer

Oil prices are provided for informational purposes only and may vary based on provider updates, market movement, and data availability. This plugin does not provide financial, investment, or trading advice.