mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Merge pull request #2766 from woocommerce/PCP-3512_improve-gettting-terms-and-conditions
replace wc_terms_and_conditions_page_id() to avoid errors (3512)
This commit is contained in:
commit
36d669c3a6
1 changed files with 7 additions and 1 deletions
|
@ -44,7 +44,13 @@ return array(
|
|||
'woocommerce-paypal-payments'
|
||||
);
|
||||
|
||||
if ( wc_terms_and_conditions_page_id() > 0 ) {
|
||||
/**
|
||||
* Replace wc_terms_and_conditions_page_id() function to avoid errors when to avoid errors because of early loading.
|
||||
*/
|
||||
$wc_terms_and_conditions_page_id = apply_filters( 'woocommerce_get_terms_page_id', get_option( 'woocommerce_terms_page_id' ) );
|
||||
$wc_terms_and_conditions_page_id = apply_filters( 'woocommerce_terms_and_conditions_page_id', 0 < $wc_terms_and_conditions_page_id ? absint( $wc_terms_and_conditions_page_id ) : 0 );
|
||||
|
||||
if ( $wc_terms_and_conditions_page_id > 0 ) {
|
||||
$label .= __(
|
||||
'<div class="ppcp-notice ppcp-notice-warning"><p><span class="highlight">Important:</span> Your store has a <a href="/wp-admin/admin.php?page=wc-settings&tab=advanced" target="_blank">Terms and Conditions</a> page configured. Buyers who use a PayPal express payment method will not be able to consent to the terms on the <code>Classic Checkout</code>, as the final checkout confirmation will be skipped.</p></div>',
|
||||
'woocommerce-paypal-payments'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue