How to Integrate WooCommerce with WordPress
1. WooCommerce By Automattic :
Description:
- Product, Cart, and Checkout pages
- Secure payments by credit card and alternatives
- Configurable shipping options, including flat rates and label printing
- Integrate content and commerce across your site via modular blocks
- Automated tax calculations
- Google Analytics, MailChimp, and Facebook integration
- Central store dashboard with key metrics, and more.
Installation:
Minimum Requirements
- PHP 7.2 or greater is recommended
- MySQL 5.6 or greater is recommended
Visit the WooCommerce server requirements documentation for a detailed list of server requirements.
Minimum Requirements
Screenshots for Automatic installation:
Steps:
1. Open your wp-config.php file from location: your_project_folder/wp-config.php
2. Add the code “define(‘FS_METHOD’,’direct’);” as in the following screenshot.
Manual installation
Manual installation method requires downloading the WooCommerce plugin and uploading it to your web server via your favorite FTP application. The WordPress codex contains instructions on how to do this here.
Sample data
WooCommerce comes with some sample data you can use to see how products look; import sample_products.xml via the WordPress importer. You can also use the core CSV importer or our CSV Import Suite extension to import sample_products.csv
Screenshots
Description:
Installation:
Screenshots for Automatic installation:
13. The last step is to get our access token.
So in Postman, enter this URL into the request URL field:
http://localhost/WooCom/wordpress/oauth1/access
- Consumer Key
- Consumer Secret
- Token
- Token Secret
Clicking the [Update Request] button will fill in the nonce and timestamp and your request URL will be transformed into something like this:
Important Links:
3. Woo REST API
Description:
Important Links:
4. CoCart by Sébastien Dumont
Description:
- Bookings
- Name Your Price
- Points and Rewards
- Pre-Orders
- Product Add-ons
Installation:
Automatic Installation
Important Links:
5. TI WooCommerce WishList Plugin by TemplateInvaders
Description:
Important Links & Installation:
6. WordPress REST API by WP REST API Team
Description:
Installation:
Important Links:
1. For WordPress REST API (Version 2) of WordPress
https://wordpress.org/plugins/rest-api/#installation
2. Check out the documentation for details on your newly available endpoints.
https://developer.wordpress.org/rest-api/
7. JWT Authentication for WP REST API by Enrique Chavez
Description:
Extends the WP REST API using JSON Web Tokens Authentication as an authentication method.
JSON Web Tokens are an open, industry-standard RFC 7519 method for representing claims securely between two parties.
Support and Requests please in Github: https://github.com/Tmeister/wp-api-jwt-auth
Requirements:
WP REST API V2
This plugin was conceived to extend the WP REST API V2 plugin features and, of course, was built on top of it.
So, to use the wp-api-jwt-auth you need to install and activate WP REST API.
PHP
PHP HTTP Authorization Header enable
Most of the shared hosting has disabled the HTTP Authorization Header by default.
To enable this option you’ll need to edit your .htaccess file add the following code
RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1] WPENGINE
To enable this option you’ll need to edit your .htaccess file add the following code
See https://github.com/Tmeister/wp-api-jwt-auth/issues/1
SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1
Configuration
CONFIGURATE THE SECRET KEY
The JWT needs a secret key to sign the token this secret key must be unique and never revealed.
To add the secret key edit your wp-config.php file and add a new constant called JWT_AUTH_SECRET_KEY
define(‘JWT_AUTH_SECRET_KEY’, ‘your-top-secret-key’);
CONFIGURATE CORS SUPPORT
The wp-api-jwt-auth plugin has the option to activate CORs support.
define(‘JWT_AUTH_CORS_ENABLE’, true);
Installation:
USING THE WORDPRESS DASHBOARD
- Navigate to the ‘Add New’ in the plugins dashboard
- Search for ‘jwt-authentication-for-wp-rest-api’
- Click ‘Install Now’
- Activate the plugin on the Plugin dashboard
UPLOADING IN WORDPRESS DASHBOARD
- Navigate to the ‘Add New’ in the plugins dashboard
- Navigate to the ‘Upload’ area
- Select jwt-authentication-for-wp-rest-api.zip from your computer
- Click ‘Install Now’
- Activate the plugin in the Plugin dashboard
Important Links:
1. For WordPress REST API (Version 2) of WordPress, usage and how to configure the plugin
https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/#description
