learndash_paypal_payment_button

apply_filters( 'learndash_paypal_payment_button',  string $paypal_button,  array $button_data )

Filters paypal payment button HTML output.


Description #


Parameters #

$paypal_button

(string) The HTML output of paypal button

$button_data

(array) An array of paypal payment button data like output and attributes.


Source #

File: includes/lib/paypal/enhanced-paypal-shortcodes.php


Examples #

 <?php
/**
 * Example usage for learndash_paypal_payment_button filter.
 */
add_filter(
	'learndash_paypal_payment_button',
	function( $paypal_button, $button_data ) {
		// May add any custom logic using $paypal_button, $button_data.

		// Always return $paypal_button.
		return $paypal_button;
	},
	10,
	2
);