Skip to content

Commit

Permalink
Pay with PayPal: Fix currencies lib loading (#17625)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmtr authored Oct 27, 2020
1 parent a8f31e1 commit da783cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/simple-payments/simple-payments.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public function output_shortcode( $data ) {
* @return string Formatted price.
*/
private function format_price( $price, $currency ) {
require_once JETPACK__PLUGIN_DIR . 'class.jetpack-currencies.php';
jetpack_require_lib( 'class-jetpack-currencies' );
return Jetpack_Currencies::format_price( $price, $currency );
}

Expand Down Expand Up @@ -553,7 +553,7 @@ function setup_cpts() {
* @return ?array Currency object or null if not found.
*/
private static function get_currency( $the_currency ) {
require_once JETPACK__PLUGIN_DIR . 'class.jetpack-currencies.php';
jetpack_require_lib( 'class-jetpack-currencies' );
$currencies = Jetpack_Currencies::CURRENCIES;

if ( isset( $currencies[ $the_currency ] ) ) {
Expand Down

0 comments on commit da783cc

Please sign in to comment.