Skip to content

Instantly share code, notes, and snippets.

View remcotolsma's full-sized avatar
🏢
Working @pronamic

Remco Tolsma remcotolsma

🏢
Working @pronamic
View GitHub Profile
@remcotolsma
remcotolsma / README.md
Created April 14, 2025 12:15
Dutch (nl) hierarchy translations for WordPress

AI-assistenten

Hoe beantwoorden AI-assistenten de volgende vraag?

Hoe zou je het Engelse woord 'parent' vertalen naar het Nederlands in de context van een hiërarchie in een content management systeem? Bijvoorbeeld in 'parent post', 'parent page', 'parent menu item', etc.?

ChatGPT GPT-4o

In de context van een hiërarchie in een content management systeem (CMS) zoals WordPress, is het Engelse woord “parent” het best te vertalen naar “bovenliggend” of “ouder”, afhankelijk van de context en voorkeur voor leesbaarheid.

@remcotolsma
remcotolsma / functions.php
Created January 7, 2025 18:45
Make sure the next payment delivery date is set to the next payment date, this will overwrite a filter in the Mollie integration.
<?php
/**
* Make sure the next payment delivery date is set to the next payment date,
* this will overwrite a filter in the Mollie integration.
*
* @link https://github.com/pronamic/wp-pronamic-pay-mollie/blob/main/documentation/Wanneer-worden-incassobetalingen-verwerkt-en-uitbetaald.md
* @link https://github.com/pronamic/wp-pronamic-pay-mollie/blob/53949bd607d24782a18730a113993d230aa6feac/src/Integration.php#L326-L407
*/
add_filter(
@remcotolsma
remcotolsma / functions.php
Last active July 19, 2023 12:27
Customize order of Restrict Content Pro gateways.
<?php
add_filter(
'rcp_payment_gateways',
function( $gateways ) {
$order = [
'pronamic_pay_credit_card' => 0,
'pronamic_pay_direct_debit' => 1,
];
@remcotolsma
remcotolsma / test-1.html
Created July 13, 2023 08:05
Lotame tag test.
<link rel="preconnect" href="https://tags.crwdcntrl.net">
<link rel="preconnect" href="https://bcp.crwdcntrl.net">
<link rel="dns-prefetch" href="https://tags.crwdcntrl.net">
<link rel="dns-prefetch" href="https://bcp.crwdcntrl.net">
<script>
! function() {
var lotameClientId = '17301';
var lotameTagInput = {
data: {},
@remcotolsma
remcotolsma / pronamic-pay-select-change-last-subscription-phase-amount.sql
Created March 31, 2023 12:56
Pronamic Pay database queries to change the last subscription phase amount.
SELECT
post.ID AS post_id,
post.post_date,
post.post_content->>'$.source.key' AS source_key,
-- The '200' value represents the new amount.
JSON_REPLACE( post.post_content, '$.phases[last].amount.value', '200' ) AS post_content
FROM
wp_posts AS post
WHERE
post.post_type = 'pronamic_pay_subscr'
@remcotolsma
remcotolsma / functions.php
Created December 8, 2022 08:12
Combine WooCommerce order meta data in one meta data field.
<?php
add_action(
'woocommerce_after_order_object_save',
function( $order ) {
$data = [
$order->get_meta( 'meta 1' ),
$order->get_meta( 'meta 2' ),
$order->get_meta( 'meta 3' ),
$order->get_meta( 'meta 4' ),
@remcotolsma
remcotolsma / functions.php
Last active August 18, 2021 14:30
Extend Formidable Forms entries list with Pronamic Pay payment info/status.
<?php
/**
* Formidable Forms.
*
* @link https://github.com/Strategy11/formidable-forms/blob/v5.0.01/classes/controllers/FrmEntriesController.php#L31
* @link https://github.com/Strategy11/formidable-forms/blob/v5.0.01/classes/helpers/FrmEntriesListHelper.php#L289-L293
*/
$screen = 'formidable_page_formidable-entries';
@remcotolsma
remcotolsma / index.php
Created August 6, 2021 13:40
Display Pronamic Pay subscriptions that require follow-up payment
<?php
define( 'WP_USE_THEMES', false );
require '../wp-blog-header.php';
$args = array(
'post_type' => 'pronamic_pay_subscr',
'nopaging' => true,
'orderby' => 'post_date',
@remcotolsma
remcotolsma / search-wp-hooks.sh
Created April 13, 2021 09:02
Quick search your project file for WordPress filters and actions.
grep --recursive --include="*.php" --exclude-dir={bower_components,deploy,node_modules,vendor,wordpress,wp-content} --ignore-case "apply_filters" .
grep --recursive --include="*.php" --exclude-dir={bower_components,deploy,node_modules,vendor,wordpress,wp-content} --ignore-case "do_action" .
@remcotolsma
remcotolsma / single-vacancy.php
Created March 17, 2021 10:56
Pronamic WordPress EasyCruit plugin display vacancy appetizer
<?php
$vacancy_appetizer = '';
$xml_string = \simplexml_load_string( \get_post_meta( \get_the_ID(), '_easycruit_vacancy_xml', true ) );
if ( ! empty( $xml_string ) ) {
$vacancy_appetizer = \strval( $xml_string->Versions->Version->Appetizer );
}