Skip to content

Instantly share code, notes, and snippets.

View dparker1005's full-sized avatar

David Parker dparker1005

  • Stranger Studios
View GitHub Profile
@dparker1005
dparker1005 / generate-translations.md
Created April 21, 2026 13:11
Run the "Generate Translations" GitHub Actions workflow for the current repo, wait for it to complete, and pull the resulting commit.

Generate Translations

Run the "Generate Translations" GitHub Actions workflow for the current repo, wait for it to complete, and pull the resulting commit.

Steps

  1. Identify the repo:
    • Run git remote -v to find the GitHub repo. Prefer a remote pointing to a strangerstudios GitHub org, then upstream, then fall back to origin. Extract the owner/repo from the URL.
    • Run git branch --show-current to get the current branch name.
@dparker1005
dparker1005 / my_pmpro_stripe_remove_all_application_fees.php
Created November 21, 2025 17:15
Remove application fees from all Stripe subscriptions.
<?php
/**
* Remove application fees from all Stripe subscriptions.
* In order to run this script, the pmpro_stripe_remove_application_fees URL parameter must be set.
* To reset the last processed subscription ID, the pmpro_stripe_remove_application_fees_reset URL parameter can also be set.
*
* ex. http://yoursite.com/?pmpro_stripe_remove_application_fees=1
*
* In order for this script to work, your site must either:
@dparker1005
dparker1005 / my_pmproapprovals_show_non_member_content_to_pending_users.php
Created July 17, 2025 13:13
If the user only has a single level and that level is pending, show them non-member content.
<?php
/**
* If the user only has a single level and that level is pending, show them non-member content.
*
* This is used to modify the behavior described here: https://github.com/strangerstudios/pmpro-approvals/issues/192
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
@dparker1005
dparker1005 / fill_empty_check_order_toatals.sql
Last active November 21, 2024 14:16
SQL query to help fix sites affected by this Pay By Check bug: https://github.com/strangerstudios/pmpro-pay-by-check/pull/131. Update total, subtotal, and membership_id accordingly.
/*
Query to help sites affected by this PMPro Pay By Check bug:
https://github.com/strangerstudios/pmpro-pay-by-check/pull/131
This will set all $0 check orders for a specific level to have a specific total.
This will not account for variable pricing such as donations or discount code uses.
Before executing this query, set membership_id to the level that you would like to fix
and total and subtotal to the recurring price for that level.
@dparker1005
dparker1005 / only_send_recurring_email_for_long_payment_periods.php
Created August 7, 2024 16:40
Only send recurring payment reminder when the last subscription payment was over 6 months ago.
<?php
/**
* Only send recurring payment reminder when the last subscription payment was over 6 months ago.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*
@dparker1005
dparker1005 / my_pmpro_checkout_custom_template_path_use_default.php
Created April 2, 2024 13:33
Use the default PMPro checkout page template instead of a custom theme tempalate.
<?php
/**
* Use the default PMPro checkout page template instead of a custom theme tempalate.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@dparker1005
dparker1005 / memberslist_billing_address.php
Created February 28, 2024 16:12
Add the "billing address" column back to the members list and CSV export.
<?php
/**
* Add the "billing address" column back to the members list and CSV export.
*
* Note: This will add the most recent billing address for the user and level
* by looking at the user's order history, not user meta.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
@dparker1005
dparker1005 / my_remove_pmpro_search_filter_pmpro_pages.php
Last active February 23, 2024 20:20
Disable hiding PMPro pages from search.
<?php
/**
* Disable hiding PMPro pages from search.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@dparker1005
dparker1005 / my_pmpro_stripe_checkout_session_parameters_subscription_description.php
Last active February 5, 2025 13:13
Updates the payment description in Stripe when purchasing a subscription using Stripe Checkout.
<?php
/**
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
*/
// Copy from below this line
/**
@dparker1005
dparker1005 / redirect_logged_out_users_from_post.php
Created October 23, 2023 13:48
Redirect logged out users from a specific post to the site's login page.
<?php
// Copy below this line.
/**
* Redirect logged out users from a specific post to the site's login page.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.