Skip to content

Instantly share code, notes, and snippets.

View nmedia82's full-sized avatar

Najeeb Ahmad nmedia82

View GitHub Profile
@nmedia82
nmedia82 / render-taxonomy-tree.php
Last active April 22, 2019 13:46
Rendering Taxonomy Tree for custom post types in Wordpress Plugin or Theme as checkbox input
/**
* Following script will render Taxonomy Tree attached with specified post type
* in following example post_type use: books
* output can be seen here: https://www.diigo.com/item/image/4xv00/xrhq
*/
$posttype = 'books'
//getting all taxonomies with attached with $posttype
$taxonomy_names = get_object_taxonomies( $posttype );
@nmedia82
nmedia82 / gist:1a7fa42dc6e8235c7eb2591414b234ff
Last active October 14, 2019 04:13
Hiding Yith inquiry tab for certain categories
/**
** Hiding for tab for following categories
** Signage
** print
** Signage + print
** Crystal awards
**/
// Paste collowing code inside your theme's functions.php file
@nmedia82
nmedia82 / ppom-price-v2-extending.js
Created December 19, 2019 06:23
PPOM Price V2 - Extending price object example
// PPOM Price V2 Related
class PPOM_OQ_Class extends PPOM_Price_Class{
constructor(field, value){
super(field, value)
}
get_price() {
let p = this.field.price || '';
@nmedia82
nmedia82 / guide.txt
Last active February 24, 2021 14:38
N-Media Plugins Settings
# Auth
N-Media Plugin Authentication Handling Script
* Checkout this repo inside plugin root or copy the Auth directory into plugin
* Remove .git directory, otherwise it will not be added into main plugin
* Paste following script into plugin main file after INCLUDING the files etc
<pre>
// Authencation checking
@nmedia82
nmedia82 / functions.php
Created April 25, 2018 04:30
Change admin admin to get WooConvo notification
// Add this code at theme's function.php at bottom
add_filter('wooconvo_message_receivers', 'wooconvo_change_admin_email', 10, 2)
function wooconvo_message_receivers($receivers, $is_admin) {
if( $is_admin ) {
$receivers = array('your@email.com'); // add more email if need in array
}
return $receivers;
}
@nmedia82
nmedia82 / Code.gs
Last active August 23, 2021 12:36
GoogleSync - Auto Sync Function in version 4
/**
* Code.gs, the main script for GoogleSync
* Please do not change this code unless I ask you :)
* File Version 4.1
* Date Modified: August 23, 2021
*/
// Add a custom menu to the active document, including a separator and a sub-menu.
function onOpen(e) {
SpreadsheetApp.getUi()
@nmedia82
nmedia82 / functions.php
Created January 31, 2022 13:15
File Manager Link Create
add_action('wp_ajax_wpfm_create_link', function(){
// wp_send_json_success($_POST);
$current_user = wpfm_get_current_user();
if( ! $current_user ) {
$resp = array('status' => 'error',
'message' => __("User object not found", 'wpfm'));
wp_send_json($resp);
}
@nmedia82
nmedia82 / home.html
Created July 3, 2022 13:23
NOWA Trainings Batch 01 HTML CSS Session 2
<html>
<head>
<title>NOWA Homepage</title>
<link href="images/favicon.png" rel="icon" type="image/x-icon" />
</head>
<body>
Hi students, today is our session no 2. And today we learn how to create
a HTML page.
2023-03-04T16:58:34+00:00 INFO Array
(
[Webhook Delivery] => Array
(
[Delivery ID] => 04b942d250e1f6735599b27d290dceba
[Date] => Mar 4, 2023 @ 16:58
[URL] => https://script.google.com/macros/s/AKfycbzREkLowPNflSOSWca5exieeOJORrNSN9E-N7POw3zeYhj8VyigAM9ExA1_igR9Fa_L/exec?event_type=product_updated&sheet_id=1m0YzHUzr8MxwfPFnxziakygwosyZ25K-CS3lc_VSwFA&store_url=https://begfeast.s1-tastewp.com
[Duration] => 1.43979
[Request] => Array
(
@nmedia82
nmedia82 / Code.gs
Last active October 16, 2023 14:39
Generating the WebApp URL for Autch Fetch for Bulk Product Sync Plugin
/**
* AutoFetch, AutoSync
* Bulk Product Sync for WooCommerce.
*
* Last October 16, 2023
* AutoFetch: AutoSync issue fixed when parents are empty.
*
* Last October 12, 2023
* AutoFetch: cells with formulas will not be updated.
*