Merged in release/release-1.09 (pull request #10)

Release/release 1.09

* Install missing plugins 
* rs set to 1

* rebase pantheon for aws

* rebase pantheon for aws

* prod config change

* prod config change

* fix campaing issue

* revert


Approved-by: Jay Sharma
This commit is contained in:
Rachit Bhargava
2023-12-27 20:55:58 +00:00
committed by Jay Sharma
parent 779393381f
commit 22f10a9edd
2154 changed files with 22313 additions and 209875 deletions

View File

@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
*
* The main entry-point for all things related to the Helper.
* The Helper manages the connection between the store and
* an account on Woo.com.
* an account on WooCommerce.com.
*/
class WC_Helper_Admin {
@@ -52,36 +52,38 @@ class WC_Helper_Admin {
}
/**
* Generates the URL for connecting or disconnecting the store to/from Woo.com.
* Generates the URL for connecting or disconnecting the store to/from WooCommerce.com.
* Approach taken from existing helper code that isn't exposed.
*
* @return string
*/
public static function get_connection_url() {
global $current_screen;
$connect_url_args = array(
'page' => 'wc-addons',
'section' => 'helper',
);
// No active connection.
if ( WC_Helper::is_site_connected() ) {
$connect_url_args['wc-helper-disconnect'] = 1;
$connect_url_args['wc-helper-nonce'] = wp_create_nonce( 'disconnect' );
} else {
$connect_url_args['wc-helper-connect'] = 1;
$connect_url_args['wc-helper-nonce'] = wp_create_nonce( 'connect' );
if ( ! WC_Helper::is_site_connected() ) {
$connect_url = add_query_arg(
array(
'page' => 'wc-addons',
'section' => 'helper',
'wc-helper-connect' => 1,
'wc-helper-nonce' => wp_create_nonce( 'connect' ),
),
admin_url( 'admin.php' )
);
return $connect_url;
}
if ( isset( $current_screen->id ) && 'woocommerce_page_wc-admin' === $current_screen->id ) {
$connect_url_args['redirect-to-wc-admin'] = 1;
}
return add_query_arg(
$connect_url_args,
$connect_url = add_query_arg(
array(
'page' => 'wc-addons',
'section' => 'helper',
'wc-helper-disconnect' => 1,
'wc-helper-nonce' => wp_create_nonce( 'disconnect' ),
),
admin_url( 'admin.php' )
);
return $connect_url;
}
/**
@@ -110,7 +112,7 @@ class WC_Helper_Admin {
}
/**
* Fetch featured products from Woo.com and serve them
* Fetch featured procucts from WooCommerce.com and serve them
* as JSON.
*/
public static function get_featured() {
@@ -122,6 +124,7 @@ class WC_Helper_Admin {
wp_send_json( $featured );
}
}
WC_Helper_Admin::load();