Skip to content

Instantly share code, notes, and snippets.

View nmedia82's full-sized avatar

Najeeb Ahmad nmedia82

View GitHub Profile
@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.
*
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 / 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.
@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 / 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 / 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 / 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 / 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 / gist:a0ec36cc08cc581719b2c5458ebd77c2
Created April 9, 2019 05:22
Setting Up Site on AWS - Ubuntu
create host file in /etc/apache2/sites-available
make sure AWS Route 53 as Host/Zone Entry for this
For WordPress Permissions Issue
> sudo chown www-data:www-data /var/www/ -R
"use strict"
var successCallback = function(data) {
var checkout_form = jQuery( 'form.woocommerce-checkout' );
// add a token to our hidden input field
console.log(data);
var token = data.response.token.token;
checkout_form.find('#twoco_token').val(token);