This file contains 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 | |
/** | |
* Update Gravity Forms currency EUR. | |
* | |
* @link https://www.pronamic.nl/2012/04/gravity-forms-euro-teken-voor-bedrag/ | |
* @link https://docs.gravityforms.com/gform_currencies/#1-update-euro | |
*/ | |
\add_filter( | |
'gform_currencies', |
This file contains 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 | |
$providers_query = new WP_Query( | |
array( | |
'post_type' => 'provider', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'country', | |
'field' => 'slug', | |
'terms' => 'nl', |
This file contains 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 | |
define( 'WP_USE_THEMES', false ); | |
require '../wp-blog-header.php'; | |
/** | |
* Holiday Media. | |
* | |
* @link https://gitlab.com/pronamic-plugins/holiday-media-booking-widget/blob/develop/holiday-media-booking-widget.php |
This file contains 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 | |
define( 'WP_USE_THEMES', false ); | |
require '../../../../wp-blog-header.php'; | |
global $wpdb; | |
$query = new WP_Query( | |
array( |
This file contains 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 | |
t.*, | |
d.* | |
FROM | |
( | |
SELECT | |
`company_code`, | |
`company_name` as `CompanyName`, | |
`period_start_date` as `Begindatum`, | |
`period_end_date` as `Einddatum`, |
This file contains 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 | |
$addresses = array(); | |
foreach ( $data as $item ) { | |
$addresses[] = (object) array( | |
'company' => 'First Company', | |
'address' => 'First Address', | |
'city' => 'First City', | |
'postcode' => 'First Postal', |
This file contains 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 | |
wp_posts.ID, | |
wp_posts.post_title, | |
wp_postmeta.meta_value | |
FROM | |
wp_posts | |
LEFT JOIN | |
wp_postmeta | |
ON ( | |
wp_posts.ID = wp_postmeta.post_id |
This file contains 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 | |
global $argv; | |
$dir = __DIR__; | |
if ( isset( $argv[1] ) ) { | |
$dir = $argv[1]; | |
} |
This file contains 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 | |
/** | |
* WordPress query to retrieve active Pronamic Pay subscriptions for current user. | |
* | |
* @link https://github.com/ApiGen/ApiGen | |
* @link https://github.com/woocommerce/woocommerce/wiki/wc_get_orders-and-WC_Order_Query | |
* @link https://github.com/woocommerce/woocommerce/wiki/wc_get_products-and-WC_Product_Query | |
*/ |
This file contains 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 | |
post.ID, | |
post.post_title, | |
post.post_date, | |
post.post_status, | |
MAX( IF( meta.meta_key = "_pronamic_payment_description", meta.meta_value, NULL ) ) AS payment_description, | |
MAX( IF( meta.meta_key = "_pronamic_payment_entrance_code", meta.meta_value, NULL ) ) AS payment_entrance_code, | |
MAX( IF( meta.meta_key = "_pronamic_payment_language", meta.meta_value, NULL ) ) AS payment_language , | |
MAX( IF( meta.meta_key = "_pronamic_payment_amount", meta.meta_value, NULL ) ) AS payment_amount, | |
MAX( IF( meta.meta_key = '_pronamic_payment_currency', meta.meta_value, NULL ) ) AS payment_currency, |