Skip to content

Instantly share code, notes, and snippets.

View YaraElmalah's full-sized avatar
🦕
channeling our aura into transformative creations.

Yara Elmalah YaraElmalah

🦕
channeling our aura into transformative creations.
View GitHub Profile
@onetarek
onetarek / class-custom-wc-webhook-mangager
Last active February 26, 2025 14:57
Add new WooComerce Webhook topic only for order completed
<?php
/*
Custom WC Webhook Manager
Add new webhook topic only for WC order completed.
Developed by Md Jahidul Islam ( oneTarek ) https://onetarek.com
*/
//Don't allow direct access
if( ! defined( 'ABSPATH' ) ) exit;

Interview Questions

Node.js

Q1: What do you mean by Asynchronous API? ☆☆

Answer: All APIs of Node.js library are aynchronous that is non-blocking. It essentially means a Node.js based server never waits for a API to return data. Server moves to next API after calling it and a notification mechanism of Events of Node.js helps server to get response from the previous API call.

Source: tutorialspoint.com

@jessepearson
jessepearson / adding_new_webhook_topics.php
Last active February 10, 2025 22:56
How to add a new custom Webhook topic in WooCommerce, with example of order filtering.
<?php // do not copy this line
/**
* add_new_topic_hooks will add a new webhook topic hook.
* @param array $topic_hooks Esxisting topic hooks.
*/
function add_new_topic_hooks( $topic_hooks ) {
// Array that has the topic as resource.event with arrays of actions that call that topic.