WC()->api_request_url for PayPal and Mijireh Closes #5183
This commit is contained in:
parent
2b5351ae95
commit
a720cc8ad4
|
@ -275,7 +275,7 @@ class WC_Gateway_Mijireh extends WC_Payment_Gateway {
|
||||||
$mj_order->add_meta_data( 'wc_order_id', $order_id );
|
$mj_order->add_meta_data( 'wc_order_id', $order_id );
|
||||||
|
|
||||||
// Set URL for mijireh payment notificatoin - use WC API
|
// Set URL for mijireh payment notificatoin - use WC API
|
||||||
$mj_order->return_url = str_replace( 'https:', 'http:', add_query_arg( 'wc-api', 'WC_Gateway_Mijireh', home_url( '/' ) ) );
|
$mj_order->return_url = WC()->api_request_url( 'WC_Gateway_Mijireh' );
|
||||||
|
|
||||||
// Identify woocommerce
|
// Identify woocommerce
|
||||||
$mj_order->partner_id = 'woo';
|
$mj_order->partner_id = 'woo';
|
||||||
|
|
|
@ -32,7 +32,7 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway {
|
||||||
$this->liveurl = 'https://www.paypal.com/cgi-bin/webscr';
|
$this->liveurl = 'https://www.paypal.com/cgi-bin/webscr';
|
||||||
$this->testurl = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
|
$this->testurl = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
|
||||||
$this->method_title = __( 'PayPal', 'woocommerce' );
|
$this->method_title = __( 'PayPal', 'woocommerce' );
|
||||||
$this->notify_url = str_replace( 'https:', 'http:', add_query_arg( 'wc-api', 'WC_Gateway_Paypal', home_url( '/' ) ) );
|
$this->notify_url = WC()->api_request_url( 'WC_Gateway_Paypal' );
|
||||||
|
|
||||||
// Load the settings.
|
// Load the settings.
|
||||||
$this->init_form_fields();
|
$this->init_form_fields();
|
||||||
|
|
Loading…
Reference in New Issue