mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
✨ New option to configure BN-Code
Configurable via a wp-config constant, or a new wp-filter.
This commit is contained in:
parent
34245a852b
commit
6efcaa5630
7 changed files with 57 additions and 12 deletions
|
@ -28,7 +28,14 @@ class PayLaterBlockRenderer {
|
|||
public function render( array $attributes, ContainerInterface $c ): string {
|
||||
if ( PayLaterBlockModule::is_block_enabled( $c->get( 'wcgateway.settings.status' ) ) ) {
|
||||
|
||||
$html = '<div id="' . esc_attr( $attributes['id'] ?? '' ) . '" class="ppcp-messages" data-partner-attribution-id="Woo_PPCP"></div>';
|
||||
/**
|
||||
* The BN code.
|
||||
*
|
||||
* @psalm-suppress UndefinedConstant -- PPCP_PAYPAL_BN_CODE
|
||||
*/
|
||||
$bn_code = PPCP_PAYPAL_BN_CODE;
|
||||
|
||||
$html = '<div id="' . esc_attr( $attributes['id'] ?? '' ) . '" class="ppcp-messages" data-partner-attribution-id="' . esc_attr( $bn_code ) . '"></div>';
|
||||
|
||||
$processor = new \WP_HTML_Tag_Processor( $html );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue