A few years ago I have written a post on “How to create custom endpoint in WooCommerce API“. That was I think for v3 of older WooCommerce. After that, I did not get much time to work on WooCommerce products. But since then I was getting some queries on how to achieve the same forcontinue reading
Coding Archives
Boto3 Single Session across the project
How to create a single boto3 session and use it across a python project? Here is the solution: Create session.py Paste the following code: import boto3 import os class Session: session = None def __init__(self): self.get_session() @classmethod def get_session(cls): if cls.session is None: cls.session = cls.start_session() return cls.session @staticmethod def start_session(): if ‘AWS_ROLE_ACCESS_KEY’ in os.environ:continue reading
Fetch Single Github File in Python
As I mentioned in the earlier post, I was recently working on a private project. We had to fetch a single GitHub file from a private Github repository without hardcoding the token or setting it as an environment variable. I could not easily find a ready solution. So prepared one. I am posting the solutioncontinue reading
Recursive merge dictionaries – Python
I recently worked on a python project and noticed a situation where I needed two dictionaries to be merged recursively. There were some easy and simple solutions, but they would not have expected results or the dictionaries were not merged recursively or merged dicts would not properly override values. So I thought to write onecontinue reading
Create Amazon Alexa custom skill to interact with your PC
I have been developing custom Alexa skill lately and wanted to tell you how fun and easy it is to build an Alexa custom skill from scratch. Why build a custom skill? Amazon echo and echo dots are smart speaker devices developed by amazon.com and released at the end of 2014 to end-users. These devicescontinue reading
Laravel Write Logs to Custom Files
When you create a worker application or any large application in Laravel you might want to keep track of logs. It might be necessary to save logs to different files to keep things clean. But by default the Laravel Log System doesn’t provide this feature. We can save to different files based on date, butcontinue reading
Drupal Save Profile Image Programmatically
When we use the Profile 2 module and need to save the profile image field (existing), we can use profile2 functions and achieve the task. Note down the Field needs to be updated. Load the profile. Add Image field to the loaded profile object Save the profile. function save_image_profile2($profile_id, $image_id){ // Load the profile objectcontinue reading
WooCommerce API Custom Endpoint – Legacy
Deprecated. Please refer How to create WooCommerce API V3 Custom Endpoint here. WooCommerce is great. But when it comes to API, it requires a little work to do some modifications. Let us take an example of custom endpoints. To make your own woocommerce api endpoint to return custom content, follow this tutorial. Create your owncontinue reading
Wpionic-material Demo
Demo coming soon. Update I have not got time to maintain this project. If you are interested to continue the development of WP Ionic Material, please feel free to contact me.
WordPress Ionic Material Design App Instructions
Wpionic-material is a multi-platform mobile application built using ionic framework. It uses wordpress api to get and post data from/to your wordpress site. Ionic uses Cordova to build application archives for Android and Ios Platforms. WP Ionic material design Installation: Install wp-api plugin to your wordpress site. Download wordpress ionic material app source code. Change var server = ‘http://demo.wp-api.org/’;continue reading