Skip to content

Commit

Permalink
Merge commit '56b98dbc7e612ce62de127a7fcc21faf8b57d1a6' into add/1267…
Browse files Browse the repository at this point in the history
…-free-trial-inbox-whitelist

# Conflicts:
#	includes/class-wc-calypso-bridge-setup.php
  • Loading branch information
Manos Psychogyiopoulos committed Oct 24, 2023
2 parents e89fade + 56b98db commit 39c3f05
Show file tree
Hide file tree
Showing 70 changed files with 6,278 additions and 2,338 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint:php:staged
33 changes: 29 additions & 4 deletions assets/css/ecommerce.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,19 @@ body.woocommerce_page_wc-bridge-landing-page #screen-meta-links {
display: none;
}

body.woocommerce_page_wc-bridge-landing-page .woocommerce-layout .woocommerce-layout__main {
padding-right: 0;
}
body.woocommerce_page_wc-bridge-landing-page .woocommerce-layout__primary {
margin: 0;
}

.wc-bridge-landing-page {
background: white;
color: #2F2F2F; /* gray-80 */
}

.wc-bridge-landing-page__title {
.woocommerce.wc-bridge-landing-page .wc-bridge-landing-page__title {
font-size: 32px;
line-height: 40px;
font-weight: 400;
Expand Down Expand Up @@ -84,6 +91,7 @@ body.woocommerce_page_wc-bridge-landing-page #screen-meta-links {
.wc-bridge-landing-page__hero-image-container img {
width: 80%;
margin-top: -60px;
max-width: 791px;
}

.wc-bridge-landing-page__sub-title {
Expand All @@ -104,14 +112,17 @@ body.woocommerce_page_wc-bridge-landing-page #screen-meta-links {
text-align: center;
}

body.woocommerce_page_wc-bridge-landing-page.woocommerce_page_wc-admin #wpbody-content {
padding-bottom: 64px;
}

.wc-bridge-landing-page__features-grid__item {
width: 33%;
padding: 0 35px;
}

.wc-bridge-landing-page__features-grid__item__icon {
text-align: center;
background: var( --color-accent-5 );
background: rgba(var(--wp-admin-theme-color--rgb), 0.1);
width: 64px;
height: 64px;
border-radius: 50%;
Expand All @@ -133,6 +144,7 @@ body.woocommerce_page_wc-bridge-landing-page #screen-meta-links {
line-height: 24px;
font-weight: 400;
margin: 0;
box-sizing: initial;
}
.wc-bridge-landing-page__features-grid__item a {
font-size: 13px;
Expand All @@ -145,6 +157,15 @@ body.woocommerce_page_wc-bridge-landing-page #screen-meta-links {
color: var( --wp-admin-theme-color );
text-decoration: underline;
}
.wc-bridge-landing-page__features-grid.wc-bridge-landing-page__features-grid--align-left {
text-align: left;
}
.wc-bridge-landing-page__features-grid.wc-bridge-landing-page__features-grid--align-left .wc-bridge-landing-page__features-grid__item__icon {
margin: 0;
}
.wc-bridge-landing-page__features-grid.wc-bridge-landing-page__features-grid--align-left .wc-bridge-landing-page__features-grid__item a {
padding-left: 0;
}

body.woocommerce_page_wc-bridge .wc-bridge-wrap .storefront {
display: none;
Expand All @@ -154,6 +175,10 @@ body.woocommerce_page_wc-bridge .wc-bridge-wrap .storefront {
.wc-bridge-landing-page__features-grid__item {
padding: 0 10px;
}

.woocommerce.wc-bridge-landing-page h1.wc-bridge-landing-page__title {
padding: 0 2em;
}
}
@media screen and (max-width: 600px) {

Expand Down Expand Up @@ -189,7 +214,7 @@ body.woocommerce_page_wc-bridge .wc-bridge-wrap .storefront {
}
.wc-bridge-landing-page__features-grid {
flex-wrap: wrap;
margin: 32px auto 0;
margin: 64px auto 0;
}
.wc-bridge-landing-page__features-grid__item {
width: 100%;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions bin/lint-php-staged.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
CHANGED_STAGED_PHP_FILES=$(git diff --staged --name-only --diff-filter=d | grep '\.php$' | xargs)
if [ -z "$CHANGED_STAGED_PHP_FILES" ]; then
echo "No modified PHP files are staged. Exiting."
exit 0
fi
vendor/bin/phpcs-changed --warning-severity=0 --extensions=php --git --git-staged $CHANGED_STAGED_PHP_FILES
4 changes: 3 additions & 1 deletion class-wc-calypso-bridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @package WC_Calypso_Bridge/Classes
* @since 1.0.0
* @version 2.2.2
* @version 2.2.15
*/

defined( 'ABSPATH' ) || exit;
Expand Down Expand Up @@ -107,6 +107,7 @@ public function includes() {
*/
require_once WC_CALYPSO_BRIDGE_PLUGIN_PATH . '/includes/class-wc-calypso-bridge-helper-functions.php';
require_once WC_CALYPSO_BRIDGE_PLUGIN_PATH . '/class-wc-calypso-bridge-shared.php';
require_once WC_CALYPSO_BRIDGE_PLUGIN_PATH . '/includes/class-wc-calypso-bridge-fse.php';
require_once WC_CALYPSO_BRIDGE_PLUGIN_PATH . '/includes/class-wc-calypso-bridge-setup.php';
require_once WC_CALYPSO_BRIDGE_PLUGIN_PATH . '/includes/class-wc-calypso-bridge-jetpack.php';
require_once WC_CALYPSO_BRIDGE_PLUGIN_PATH . '/includes/class-wc-calypso-bridge-setup-tasks.php';
Expand All @@ -131,6 +132,7 @@ public function includes() {
require_once WC_CALYPSO_BRIDGE_PLUGIN_PATH . '/includes/class-wc-calypso-bridge-free-trial-store-details-task.php';
require_once WC_CALYPSO_BRIDGE_PLUGIN_PATH . '/includes/class-wc-calypso-bridge-product-import-fix.php';
require_once WC_CALYPSO_BRIDGE_PLUGIN_PATH . '/includes/class-wc-calypso-bridge-skip-obw.php';
require_once WC_CALYPSO_BRIDGE_PLUGIN_PATH . '/includes/class-wc-calypso-bridge-footer-credits.php';

// Experiments.
require_once WC_CALYPSO_BRIDGE_PLUGIN_PATH . '/includes/experiments/class-wc-calypso-bridge-task-list-reminderbar-experiment.php';
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "automattic/wc-calypso-bridge",
"version": "v2.2.8",
"version": "v2.2.17",
"autoload": {
"files": [
"wc-calypso-bridge.php"
Expand Down Expand Up @@ -31,7 +31,8 @@
"wimg/php-compatibility": "9.0.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"yoast/phpunit-polyfills": "^1.0",
"wp-cli/wp-cli-bundle": "^2.8.1"
"wp-cli/wp-cli-bundle": "^2.8.1",
"sirbrillig/phpcs-changed": "^2.11"
},
"scripts": {
"test": [
Expand Down
56 changes: 55 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions includes/class-wc-calypso-bridge-addons.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @package WC_Calypso_Bridge/Classes
* @since 1.0.6
* @version 2.0.0
* @version 2.2.17
*/

defined( 'ABSPATH' ) || exit;
Expand Down Expand Up @@ -54,9 +54,11 @@ private function __construct() {
* Initialize.
*/
public function init() {

// Hide the default marketplace.
add_filter( 'woocommerce_show_addons_page', '__return_false' );
// Handle the addons legacy page.
add_action( 'admin_menu', array( $this, 'addons_menu' ), 70 );
add_action( 'woocommerce_loaded', array( $this, 'load_modified_addons_menu' ) );

// Add admin body class for the free trial landing page.
if ( wc_calypso_bridge_is_ecommerce_trial_plan() ) {
Expand All @@ -72,11 +74,8 @@ public function init() {
}
}

/**
* Load the class for the modified Addons menu.
*/
public function load_modified_addons_menu() {
require 'class-wc-modified-admin-addons.php';
public function get_menu_slug() {
return class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) && \Automattic\WooCommerce\Utilities\FeaturesUtil::feature_is_enabled( 'marketplace' ) && ! wc_calypso_bridge_is_ecommerce_trial_plan() ? 'wc-admin&path=/extensions' : 'wc-addons';
}

/**
Expand Down
Loading

0 comments on commit 39c3f05

Please sign in to comment.