Merge branch 'task/shared-apple-google' into PCP-1744-google-pay-integration

# Conflicts:
#	modules/ppcp-blocks/resources/js/checkout-block.js
#	modules/ppcp-button/src/Endpoint/CartScriptParamsEndpoint.php
This commit is contained in:
Pedro Silva 2023-09-07 16:59:35 +01:00
commit aa962e832c
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
2 changed files with 9 additions and 4 deletions

View file

@ -81,10 +81,10 @@ class CartScriptParamsEndpoint implements EndpointInterface {
wp_send_json_success(
array(
'url_params' => $script_data['url_params'],
'button' => $script_data['button'],
'messages' => $script_data['messages'],
'amount' => WC()->cart->get_total( 'raw' ),
'url_params' => $script_data['url_params'],
'button' => $script_data['button'],
'messages' => $script_data['messages'],
'amount' => WC()->cart->get_total( 'raw' ),
'total' => $total,
'total_str' => ( new Money( $total, $currency_code ) )->value_str(),

View file

@ -425,6 +425,11 @@ class SettingsListener {
$this->dcc_status_cache->delete( DCCProductStatus::DCC_STATUS_CACHE_KEY );
}
/**
* The hook fired during listening the request so a module can remove also the cache or other logic.
*/
do_action( 'woocommerce_paypal_payments_on_listening_request' );
$ppcp_reference_transaction_enabled = get_transient( 'ppcp_reference_transaction_enabled' ) ?? '';
if ( $ppcp_reference_transaction_enabled ) {
delete_transient( 'ppcp_reference_transaction_enabled' );