PHP Classes

Ade PHP WooCommerce API Authentication: Plugin to authenticate API calls with WooCommerce

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2023-06-18 (11 months ago) RSS 2.0 feedNot enough user ratingsTotal: 34 All time: 10,983 This week: 71Up
Version License PHP version Categories
ade-woocommerce-api- 1.0.0The PHP License5PHP 5, E-Commerce, Content management, W..., B...
Description 

Author

This package provides a plugin to authenticate API calls with WooCommerce.

It provides alternative callback functions to implement several types of authorization to access API calls provided by a WooCommerce site.

Currently, it provides several types of user authentication functions that can work on sites with and without SSL:

- Parameters passed in the request query strings

- OAuth-based authentication

Innovation Award
PHP Programming Innovation award nominee
June 2023
Number 6
WooCommerce is a popular e-commerce platform developed in PHP based on WordPress.

It also provides the possibility to expose an API that can be used by external applications to integrate with WooCommerce.

Any application based on WordPress can be extended by plugins that provide additional functionality to make it more useful.

This package provides a plugin that implements several types of authentication to the API calls that can be added to the WooCommerce API.

This way, access to the API calls can be restricted to applications that can perform the authentication steps based on the OAuth protocol or simple parameters passed in the API call URLs.

Manuel Lemos
Picture of Adeleye Ayodeji
  Performance   Level  
Name: Adeleye Ayodeji <contact>
Classes: 19 packages by
Country: Nigeria Nigeria
Innovation award
Innovation award
Nominee: 13x

Details

=== Ade Woo API Authentication === Contributors: biggidroid Tags: ade-woo-api-auth, rest api, api, woo api, api auth, rest auth, simple auth, simple authentication, authentication, auth, rest, restful, restful api, restful authentication, restful auth, restful api Requires at least: 6.0 Tested up to: 6.2 Requires PHP: 7.3 Stable tag: 7.7.2 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html

This plugin allow you to authenticate your API request with woo-commerce authentication.

== Description ==

This plugin allow you to authenticate your API request with woo-commerce authentication.

== Installation ==

  1. Upload the plugin files to the `/wp-content/plugins/ade-woo-api-auth` directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the 'Plugins' screen in WordPress
  3. See more details below.

//add the following code in your theme's functions.php file or in your plugin file.

require_once WP_PLUGIN_DIR . '/ade-woo-api-auth/ade-woo-api-auth.php'; //include the plugin file

//declare an api endpoint
add_action('rest_api_init', function () {
	register_rest_route('ade/custom', '/get_post_ade', array(
		'methods' => 'GET',
		'callback' => 'get_post_ade',
		'permission_callback' => 'ade_oauth_authentication' //add this line to authenticate your api request
	));
});

//declare a callback function
function get_post_ade()
{
	return new WP_REST_Response([
		'posts' => 'hello world'
	]);
}

//add the following code in your theme's functions.php file or in your plugin file. If you want to authenticate your api request with custom authentication.

//We have way to authenticate your api request. You can use any one of the following method.

//Method 1:
 ade_woo_auth() //This function is used to authenticate rest api request with query string authentication method on ssl

//Method 2:
 ade_woo_auth_no_ssl() //This function is used to authenticate rest api request with query string authentication method on non-ssl

//Method 3:
 ade_oauth_authentication() //This function is used to authenticate rest api request with oauth authentication method both ssl and non ssl

== Changelog ==

= 1.0.0 =

  • Initial release

== Upgrade Notice ==

= 1.0.0 =

  • Initial release

  Files folder image Files  
File Role Description
Files folder imageinc (1 file)
Accessible without login Plain text file ade-woo-api-auth.php Aux. Plugin functions
Accessible without login Plain text file readme.md Doc. Documentation

  Files folder image Files  /  inc  
File Role Description
  Plain text file core.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:34
This week:0
All time:10,983
This week:71Up