This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function couponDiscount($cart) | |
| { | |
| $discount = 100; //test value | |
| if ($discount > 0) { | |
| // TODO: fix tax exclusion | |
| $cart->add_fee(__("Custom discount"), -$discount); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' |
OlderNewer