Skip to content

Commit

Permalink
release: fixes
Browse files Browse the repository at this point in the history
- Fixed compatibility issue with WordPress 6.7 that was throwing warnings on translations
- Fixed WooCoomerce icon display issue on notices
  • Loading branch information
vytisbulkevicius authored Nov 21, 2024
2 parents 49ce405 + 0282470 commit 8ce5ff2
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 21 deletions.
5 changes: 0 additions & 5 deletions assets/scss/components/compat/woocommerce/_notices.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
--primarybtnhoverbg: transparent;
--primarybtnbg: transparent;

&::before {
display: none;
}

> a {

@extend %nv-button-primary-no-colors;
Expand Down Expand Up @@ -136,7 +132,6 @@ $blockNotices: (
}

.woocommerce .woocommerce-error {
padding-left: 3.5em;

li {
width: 100%;
Expand Down
12 changes: 6 additions & 6 deletions composer.lock

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

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ test.describe('Custom Global Color Control', () => {
);
await clearWelcome(page);

await page.locator('.block-editor-rich-text__editable').first().click();
const iframeElement = await page.waitForSelector('iframe');
const frame = await iframeElement.contentFrame();
if (frame) {
await frame.waitForSelector('.block-editor-rich-text__editable');
await frame.locator('.block-editor-rich-text__editable').first().click();
}
// use Background color control to open the color picker, available since WP 6.1
await page.getByRole('button', { name: 'Background' }).click();
await page.getByRole('option', { name: 'Color: Custom 1' }).click();
Expand Down
30 changes: 25 additions & 5 deletions e2e-tests/specs/customizer/hfg/hfg-menu-item-description.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ test.describe('Menu item description', function () {
await page.getByRole('button', { name: 'Add New Category' }).click();
await page.goto('wp-admin/nav-menus.php');

await page
.getByRole('heading', {
name: 'Categories Press return or enter to open this section ',
})
.click();
await page.waitForSelector('.menu-name');
await page.locator('.menu-name').fill('My New Menu');
await page.getByLabel('Primary Menu').check();
await page.locator('#save_menu_footer ').click();

await page.locator('#add-category h3').click();
await page
.locator('#taxonomy-category-tabs')
.getByRole('link', { name: 'View All' })
Expand All @@ -51,6 +52,25 @@ test.describe('Menu item description', function () {
await page.keyboard.press('End');
await page.waitForTimeout(500);

await page.locator('#add-post-type-page h3').click();
await page
.locator('#posttype-page-tabs')
.getByRole('link', { name: 'View All' })
.click();
await page.getByLabel('Sample Page').last().check();

await Promise.all([
page.waitForResponse(
(res) =>
res.url().includes('wp-admin/admin-ajax.php') &&
res.status() === 200
),
page.getByRole('button', { name: 'Add to Menu' }).click(),
]);

await page.keyboard.press('End');
await page.waitForTimeout(500);

await expect(
page.locator('#menu-to-edit li.menu-item:last-child a.item-edit')
).toBeVisible();
Expand Down
2 changes: 1 addition & 1 deletion inc/compatibility/web_stories.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private function should_load() {
* Load hooks.
*/
private function load_hooks() {
add_action( 'after_setup_theme', array( $this, 'setup' ) );
add_action( 'init', array( $this, 'setup' ) );
add_action( 'wp_body_open', array( $this, 'embed' ) );
}

Expand Down
2 changes: 1 addition & 1 deletion inc/core/core_loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function () {
);
$front_end = new Front_End();
add_action( 'wp_enqueue_scripts', array( $front_end, 'enqueue_scripts' ) );
add_action( 'after_setup_theme', array( $front_end, 'setup_theme' ) );
add_action( 'init', array( $front_end, 'setup_theme' ) );
add_action( 'widgets_init', array( $front_end, 'register_sidebars' ) );
add_filter( 'load_script_translation_file', array( $front_end, 'fix_script_translation_files' ), 10, 3 );
}
Expand Down
10 changes: 8 additions & 2 deletions start.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,14 @@ function neve_run() {
}

$autoloader->register();
}

neve_run();

/**
* Load core modules.
*/
function neve_core_loader() {
if ( class_exists( '\\Neve\\Core\\Core_Loader' ) ) {
new \Neve\Core\Core_Loader();
}
Expand All @@ -71,5 +78,4 @@ function neve_run() {
\Neve_Pro\Core\Loader::instance();
}
}

neve_run();
add_action( 'after_setup_theme', 'neve_core_loader' );

0 comments on commit 8ce5ff2

Please sign in to comment.