Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
[CYS] Fix decoding issue and pattern (#11681)
Browse files Browse the repository at this point in the history
* Fix pattern description

* Decode the actual file content, not the filepath
  • Loading branch information
albarin authored and gigitux committed Nov 8, 2023
1 parent 8d0a6a7 commit 115c4d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Patterns/PatternsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private static function get_patterns_dictionary( $pattern_slug = null ) {
return new WP_Error( 'missing_patterns_dictionary', __( 'The patterns dictionary is missing.', 'woo-gutenberg-products-block' ) );
}

$patterns_dictionary = json_decode( $patterns_dictionary_file, true );
$patterns_dictionary = wp_json_file_decode( $patterns_dictionary_file, array( 'associative' => true ) );

if ( ! empty( $pattern_slug ) ) {
foreach ( $patterns_dictionary as $pattern_dictionary ) {
Expand Down

0 comments on commit 115c4d0

Please sign in to comment.