mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Remove unused ajax endpoint
This commit is contained in:
parent
1b76c67e54
commit
e201637353
1 changed files with 0 additions and 30 deletions
|
@ -80,26 +80,6 @@ class SavePaymentMethodsModule implements ModuleInterface {
|
|||
return;
|
||||
}
|
||||
|
||||
add_filter(
|
||||
'woocommerce_paypal_payments_localized_script_data',
|
||||
function( array $localized_script_data ) use ( $c ) {
|
||||
$api = $c->get( 'api.user-id-token' );
|
||||
assert( $api instanceof UserIdToken );
|
||||
|
||||
$logger = $c->get( 'woocommerce.logger.woocommerce' );
|
||||
assert( $logger instanceof LoggerInterface );
|
||||
|
||||
$localized_script_data = $this->add_id_token_to_script_data( $api, $logger, $localized_script_data );
|
||||
|
||||
$localized_script_data['ajax']['capture_card_payment'] = array(
|
||||
'endpoint' => \WC_AJAX::get_endpoint( CaptureCardPayment::ENDPOINT ),
|
||||
'nonce' => wp_create_nonce( CaptureCardPayment::nonce() ),
|
||||
);
|
||||
|
||||
return $localized_script_data;
|
||||
}
|
||||
);
|
||||
|
||||
// Adds attributes needed to save payment method.
|
||||
add_filter(
|
||||
'ppcp_create_order_request_body_data',
|
||||
|
@ -402,16 +382,6 @@ class SavePaymentMethodsModule implements ModuleInterface {
|
|||
}
|
||||
);
|
||||
|
||||
add_action(
|
||||
'wc_ajax_' . CaptureCardPayment::ENDPOINT,
|
||||
static function () use ( $c ) {
|
||||
$endpoint = $c->get( 'save-payment-methods.endpoint.capture-card-payment' );
|
||||
assert( $endpoint instanceof CaptureCardPayment );
|
||||
|
||||
$endpoint->handle_request();
|
||||
}
|
||||
);
|
||||
|
||||
add_filter(
|
||||
'woocommerce_paypal_payments_save_payment_methods_eligible',
|
||||
function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue