Skip to content

Instantly share code, notes, and snippets.

View reigelgallarde's full-sized avatar

Reigel Gallarde reigelgallarde

View GitHub Profile
@reigelgallarde
reigelgallarde / encryption.js
Last active October 2, 2018 06:12 — forked from Tiriel/encryption.js
Symetric encryption/decryption for PHP and NodeJS communication
'use strict';
const crypto = require('crypto');
const AES_METHOD = 'aes-256-cbc';
const IV_LENGTH = 16; // For AES, this is always 16, checked with php
const password = 'lbwyBzfgzUIvXZFShJuikaWvLJhIVq36'; // Must be 256 bytes (32 characters)
function encrypt(text, password) {
<?php
/*
Plugin Name: Bot For WP
Description: Messenger bot for WordPress
Plugin URI: http://snypd.com/
Author: Sunny Luthra
Author URI: http://#
Version: 1.0
License: GPL2
*/
<?php
add_filter('wc_customer_order_csv_export_order_row','wc_customer_order_csv_export_order_row',10,1);
function wc_customer_order_csv_export_order_row($order_data){
if (!is_array($order_data)) { return $order_data; }
if (!is_numeric($order_data['cart_discount'])) {
$order_data['cart_discount'] = 0.00;
}
if (!is_numeric($order_data['order_discount'])) {
$order_data['order_discount'] = 0.00;
}
@reigelgallarde
reigelgallarde / woocommerce_product_tabs_contact_form7.php
Last active February 27, 2017 20:35
WooCommerce Additional Tab Product Inquiry.
<?php
/**
* Plugin Name: WooCommerce plus Contact Form 7
* Plugin URI: http://reigelgallarde.me/plugins/how-to-add-inquiry-tab-to-your-product-in-woocommerce-using-contact-form-7
* Description: Additional Tab Product Inquiry.
* Author: Reigel Gallarde
* Author URI: http://reigelgallarde.me
* Version: 0.1
* Tested up to: 4.1
*