mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 17:51:41 +08:00
Add before/after message wrapper hooks
This commit is contained in:
parent
35be33a0cb
commit
9fdcef4b0d
1 changed files with 12 additions and 1 deletions
|
@ -686,6 +686,7 @@ class SmartButton implements SmartButtonInterface {
|
||||||
$product = wc_get_product();
|
$product = wc_get_product();
|
||||||
|
|
||||||
$location = $this->location();
|
$location = $this->location();
|
||||||
|
$location_hook = $this->location_to_hook( $location );
|
||||||
|
|
||||||
if (
|
if (
|
||||||
$location === 'product' && is_a( $product, WC_Product::class )
|
$location === 'product' && is_a( $product, WC_Product::class )
|
||||||
|
@ -697,7 +698,17 @@ class SmartButton implements SmartButtonInterface {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A hook executed before rendering of the PCP Pay Later messages wrapper.
|
||||||
|
*/
|
||||||
|
do_action( "ppcp_before_{$location_hook}_message_wrapper" );
|
||||||
|
|
||||||
echo '<div id="ppcp-messages" data-partner-attribution-id="Woo_PPCP"></div>';
|
echo '<div id="ppcp-messages" data-partner-attribution-id="Woo_PPCP"></div>';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A hook executed after rendering of the PCP Pay Later messages wrapper.
|
||||||
|
*/
|
||||||
|
do_action( "ppcp_after_{$location_hook}_message_wrapper" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue