mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 12:25:15 +08:00
Do not render custom oxxo button in checkout
This commit is contained in:
parent
752d327188
commit
d1c4850c4d
4 changed files with 64 additions and 9 deletions
|
@ -78,11 +78,20 @@ class OXXO {
|
|||
array( $this, 'register_assets' )
|
||||
);
|
||||
|
||||
add_action(
|
||||
'woocommerce_review_order_after_payment',
|
||||
function () {
|
||||
echo '<button style="display:none" class="button" id="ppcp-oxxo">Pago en OXXO</button>';
|
||||
}
|
||||
add_filter(
|
||||
'woocommerce_thankyou_order_received_text',
|
||||
function( string $message, WC_Order $order ) {
|
||||
$payer_action = $order->get_meta( 'ppcp_oxxo_payer_action' ) ?? '';
|
||||
|
||||
$button = '';
|
||||
if ( $payer_action ) {
|
||||
$button = '<p><a id="ppcp-oxxo-payer-action" class="button" href="' . $payer_action . '" target="_blank">See OXXO Voucher/Ticket</a></p>';
|
||||
}
|
||||
|
||||
return $message . ' ' . $button;
|
||||
},
|
||||
10,
|
||||
2
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,6 @@ class OXXOGateway extends WC_Payment_Gateway {
|
|||
*/
|
||||
public function process_payment( $order_id ) {
|
||||
$wc_order = wc_get_order( $order_id );
|
||||
$wc_order->update_status( 'on-hold', __( 'Awaiting OXXO payment.', 'woocommerce-paypal-payments' ) );
|
||||
$purchase_unit = $this->purchase_unit_factory->from_wc_order( $wc_order );
|
||||
$payer_action = '';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue