♻️ Move code from old onboarding to api module

To make services reusable in the new settings module, without creating a dependency on the old module
This commit is contained in:
Philipp Stracker 2024-11-08 17:09:07 +01:00
parent bd83cc201c
commit 263806904b
No known key found for this signature in database
3 changed files with 85 additions and 59 deletions

View file

@ -29,9 +29,33 @@ if ( ! defined( 'MINUTE_IN_SECONDS' ) ) {
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', '' );
}
if ( ! defined( 'PAYPAL_API_URL' ) ) {
define( 'PAYPAL_API_URL', 'https://api-m.paypal.com' );
}
if ( ! defined( 'PAYPAL_SANDBOX_API_URL' ) ) {
define( 'PAYPAL_SANDBOX_API_URL', 'https://api-m.sandbox.paypal.com' );
}
if ( ! defined( 'PPCP_PAYPAL_BN_CODE' ) ) {
define( 'PPCP_PAYPAL_BN_CODE', 'Woo_PPCP' );
}
if ( ! defined( 'CONNECT_WOO_CLIENT_ID' ) ) {
define( 'CONNECT_WOO_CLIENT_ID', 'AcCAsWta_JTL__OfpjspNyH7c1GGHH332fLwonA5CwX4Y10mhybRZmHLA0GdRbwKwjQIhpDQy0pluX_P' );
}
if ( ! defined( 'CONNECT_WOO_SANDBOX_CLIENT_ID' ) ) {
define( 'CONNECT_WOO_SANDBOX_CLIENT_ID', 'AYmOHbt1VHg-OZ_oihPdzKEVbU3qg0qXonBcAztuzniQRaKE0w1Hr762cSFwd4n8wxOl-TCWohEa0XM_' );
}
if ( ! defined( 'CONNECT_WOO_MERCHANT_ID' ) ) {
define( 'CONNECT_WOO_MERCHANT_ID', 'K8SKZ36LQBWXJ' );
}
if ( ! defined( 'CONNECT_WOO_SANDBOX_MERCHANT_ID' ) ) {
define( 'CONNECT_WOO_SANDBOX_MERCHANT_ID', 'MPMFHQTVMBZ6G' );
}
if ( ! defined( 'CONNECT_WOO_URL' ) ) {
define( 'CONNECT_WOO_URL', 'https://api.woocommerce.com/integrations/ppc' );
}
if ( ! defined( 'CONNECT_WOO_SANDBOX_URL' ) ) {
define( 'CONNECT_WOO_SANDBOX_URL', 'https://api.woocommerce.com/integrations/ppcsandbox' );
}
/**
* Cancel the next occurrence of a scheduled action.
@ -78,12 +102,15 @@ class WP_HTML_Tag_Processor {
public function __construct( $html ) {
}
public function next_tag( $query = null ) {
public function next_tag( $query = null ) : bool {
return false;
}
public function set_attribute( $name, $value ) {
public function set_attribute( $name, $value ) : bool {
return false;
}
public function get_updated_html() {
public function get_updated_html() : string {
return '';
}
}