Skip to content

Instantly share code, notes, and snippets.

Avatar

sandeep jain sandeepjain2015

View GitHub Profile
@sandeepjain2015
sandeepjain2015 / class-ewpapi-all-products-by-sorting-rest-controller.php
Created Dec 14, 2021
WordPress rest api for get all products by sorting like latest, price, rating or popularity
View class-ewpapi-all-products-by-sorting-rest-controller.php
<?php
/**
* All Products By Sorting.
*
* @package :ewpapi
*/
/**
*
* Add an endpoint to show all products by sorting.
View wordpress-developer-code-review-php.php
<?php
/**
* This code retrieves course data from an external API and displays it in the user's
* My Account area. A merchant has noticed that there's a delay when loading the page.
*
* == By using cache ==
*/
public function add_my_courses_section() {
global $current_user;