Skip to content

Instantly share code, notes, and snippets.

@dokker
dokker / startRP.php
Last active August 26, 2016 12:33 — forked from anonymous/startRP.php
/**
* Set recurring payment for PMGW request
* @param int $amount donation amount
* @return object PMGW request
*/
private function startRP($amount, $provider = 'PayPal')
{
try {
/**
* Initialize new PMGW request
<?php
public function couponDiscount($cart)
{
$discount = 100; //test value
if ($discount > 0) {
// TODO: fix tax exclusion
$cart->add_fee(__("Custom discount"), -$discount);
}
}
.menu-item-496 a:after {
content: "\f07a";
font: normal normal normal 20px/1 FontAwesome;
position: absolute;
top: 34%;
visibility: visible;
}
.menu-item-496 a {
visibility: hidden;
SELECT p.ID, DATE_FORMAT(p.post_date, '%Y.%m.%d.'), pp.post_title AS 'coupon_title' 
FROM `wp_posts` AS `p` 
JOIN `wp_postmeta` AS `pm` ON pm.meta_value = p.ID 
JOIN `wp_posts` AS `pp` ON pm.post_id = pp.ID 
WHERE p.`post_type` LIKE 'shop_order' AND pm.meta_key LIKE '_used_by'