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 | |
/** | |
* Pronamic Pay Adyen payment metadata. | |
* | |
* @param array $metadata Metadata. | |
* @param Payment $payment Payment. | |
* | |
* @return 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
/** | |
* Gravity Perks Unique ID wait for payment support for Pronamic Pay. | |
* http://gravitywiz.com/documentation/gp-unique-id/ | |
*/ | |
add_filter( 'gpui_wait_for_payment', function( $enabled ) { | |
if ( class_exists( '\Pronamic\WordPress\Pay\Extensions\GravityForms\Extension' ) ) { | |
$enabled = true; | |
} | |
return $enabled; |
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 | |
// Add below code to functions.php of your WordPress theme. | |
/** | |
* Pronamic Pay status update process Buckaroo parameter. | |
* | |
* @param Payment $payment The payment. | |
* @param bool $can_redirect Whether or not to redirect. | |
* @param string $old_status Old paymet status. | |
* @param string $new_status New payment status. |
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 | |
/** | |
* Set Yoast SEO canonical URL meta for given post types and taxonomies | |
* to current link and perform given URL replacements. | |
* | |
* To run, set query variable: `/wp-admin/?pronamic_set_canonical=true`. | |
* | |
* @return void | |
*/ |
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 | |
/** | |
* Pronamic Pay privacy erasure by email address. | |
*/ | |
$emails = array(); | |
$privacy_erasers = pronamic_pay_plugin()->privacy_manager->register_erasers( array() ); | |
foreach ( $emails as $email ) { | |
foreach ( $privacy_erasers as $eraser ) { |
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 | |
// Add below code to functions.php of your WordPress theme. | |
/** | |
* Pronamic Pay status update notice. | |
* | |
* @param Payment $payment The payment. | |
* @param bool $can_redirect Whether or not to redirect. | |
* @param string $old_status Old paymet status. | |
* @param string $new_status New payment status. |
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 | |
/** | |
* Pronamic Pay custom subscription cancel redirect URL. | |
*/ | |
add_action( 'pronamic_subscription_status_update_gravityformsideal', 'pronamic_pay_subscription_cancel_redirect_url', 10, 1 ); | |
function pronamic_pay_subscription_cancel_redirect_url( $subscription ) { | |
$redirect_url = home_url(); |
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
/* | |
* WooCommerce Subscriptions - Skip order status 'On hold'. | |
*/ | |
add_filter( 'pronamic_payment_status_update_woocommerce_unknown_to_open', 'pronamic_pay_wcs_skip_on_hold', 10, 2 ); | |
function pronamic_pay_wcs_skip_on_hold( $payment, $can_redirect ) { | |
if ( 'woocommerce' !== $payment->get_source() ) { | |
return; | |
} |
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 | |
/** | |
* Gravity Forms iDEAL fulfillment hook. | |
* | |
* @link https://github.com/wp-pay-extensions/gravityforms/blob/2.1.2/src/Extension.php#L729-L730 | |
* | |
* @param array $entry Gravity Forms entry. | |
* @param \Pronamic\WordPress\Pay\Extensions\GravityForms\PayFeed $feed Payment feed. | |
*/ |
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
/** | |
* Link to WooCommerce tabs from anywhere on the page. | |
* | |
* Example usage: | |
* <a href="#wc-tab-description">Description</a> | |
* <a href="#wc-tab-reviews">Reviews</a> | |
*/ | |
$( document ).on( 'click', 'a[href^="#wc-tab"]', function( e ) { | |
if ( e.preventDefault ) { | |
e.preventDefault(); |