t_endpoint( SaveConfig::ENDPOINT ),
'nonce' => wp_create_nonce( SaveConfig::nonce() ),
),
'get_config' => array(
'endpoint' => \WC_AJAX::get_endpoint( GetConfig::ENDPOINT ),
'nonce' => wp_create_nonce( GetConfig::nonce() ),
),
),
'config' => $config_factory->from_settings( $settings ),
'merchantClientId' => $settings->get( 'client_id' ),
'partnerClientId' => $c->get( 'api.partner_merchant_id' ),
'bnCode' => $bn_code,
'publishButtonClassName' => 'ppcp-paylater-configurator-publishButton',
'headerClassName' => 'ppcp-paylater-configurator-header',
'subheaderClassName' => 'ppcp-paylater-configurator-subheader',
)
);
}
);
return true;
}
/**
* Conditionally registers a new admin notice to highlight the new Pay-Later UI.
*
* The notice appears on any PayPal-Settings page, except for the Pay-Later settings page,
* when no Pay-Later messaging is used yet.
*
* @param array $message_locations PayLater messaging locations.
* @param bool $is_settings_page Whether the current page is a WC settings page.
* @param string $current_page_id ID of current settings page tab.
*
* @return void
*/
private static function add_paylater_update_notice( array $message_locations, bool $is_settings_page, string $current_page_id ) : void {
// The message must be registered on any WC-Settings page, except for the Pay Later page.
if ( ! $is_settings_page || Settings::PAY_LATER_TAB_ID === $current_page_id ) {
return;
}
// Don't display the notice when Pay-Later messaging is already used.
if ( count( $message_locations ) ) {
return;
}
add_filter(
Repository::NOTICES_FILTER,
/**
* Notify the user about the new Pay-Later UI.
*
* @param array $notices The notices.
* @return array
*
* @psalm-suppress MissingClosureParamType
*/
static function ( $notices ) : array {
$settings_url = admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway&ppcp-tab=ppcp-pay-later' );
$message = sprintf(
// translators: %1$s and %2$s are the opening and closing of HTML tag directing to the Pay-Later settings page.
__(
'NEW: Check out the recently revamped %1$sPayPal Pay Later messaging experience here%2$s. Get paid in full at checkout while giving your customers the flexibility to pay in installments over time.',
'woocommerce-paypal-payments'
),
'',
''
);
$notices[] = new PersistentMessage(
'pay-later-messaging',
$message,
'info',
'ppcp-notice-wrapper'
);
return $notices;
}
);
}
}
Fatal error: Uncaught Error: Class "WooCommerce\PayPalCommerce\PayLaterConfigurator\PayLaterConfiguratorModule" not found in /htdocs/wp-content/plugins/woocommerce-paypal-payments/modules.php:77
Stack trace:
#0 /htdocs/wp-content/plugins/woocommerce-paypal-payments/bootstrap.php(22): {closure}('/htdocs/wp-cont...')
#1 /htdocs/wp-content/plugins/woocommerce-paypal-payments/woocommerce-paypal-payments.php(78): {closure}('/htdocs/wp-cont...')
#2 /htdocs/wp-content/plugins/woocommerce-paypal-payments/woocommerce-paypal-payments.php(93): WooCommerce\PayPalCommerce\init()
#3 /htdocs/wp-includes/class-wp-hook.php(324): WooCommerce\PayPalCommerce\{closure}('')
#4 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#5 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#6 /htdocs/wp-settings.php(559): do_action('plugins_loaded')
#7 /htdocs/wp-config.php(82): require_once('/htdocs/wp-sett...')
#8 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...')
#9 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...')
#10 /htdocs/index.php(17): require('/htdocs/wp-blog...')
#11 {main}
thrown in /htdocs/wp-content/plugins/woocommerce-paypal-payments/modules.php on line 77