Load PayPal gateway directly to prevent potential gateway errors.
`install()` method may be called before wc_version is set, this may cause unknown errors in 3PD gateways. So its safer to only load PayPal gateway directly.
This commit is contained in:
parent
ed3c76bd1d
commit
381626069e
|
@ -1631,7 +1631,9 @@ CREATE TABLE {$wpdb->prefix}wc_reserved_stock (
|
|||
*/
|
||||
private static function set_paypal_standard_load_eligibility() {
|
||||
// Initiating the payment gateways sets the flag.
|
||||
WC()->payment_gateways();
|
||||
if ( class_exists( 'WC_Gateway_Paypal' ) ) {
|
||||
( new WC_Gateway_Paypal() )->should_load();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue