Just upgraded to wordpress 6.7 version and I receive the following message:
Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the simple-comment-editing domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. (This message was added in version 6.7.0.)
]]>I would like to find a solution to the next problem: I use CF7, and I would like to give maximum submission in form. Is there a suitable function or plugin?
]]>There’s a question, if there any chance to add a function to randomize posts for “Posts You Might Like” section? We can choose categories, number of posts. But if you add a “random” or “shuffle” function there, it will be very helpful for the UX and for giving more attention for old posts through new posts.
]]>I create Plugin A with button whose id is ‘convert-button’ and there is a JS function like below:
$(‘#convert-button’).on(‘click’, function() {
However, in Plugin B, there is also a button with id ‘convert-button’, and it also has a function like below:
$(‘#convert-button’).on(‘click’, function() {
Now the problem is when I click the “convert” button in Plugin A, both onclick functions in two plugins will be called. How to prevent this?
]]>I found a way to filter and customize the Google calendar link, but I see no way to apply a similar customization to the ical / outlook 365 links. Is there are a way to filter/customize the ical and outlook 365 add to calendar links?
Here is a function / filter I’ve added to pull in the excerpt instead of the full content, and remove any paragraph tags that get pulled into the event description.
function custom_tec_gcal_link_parameters( $gcal_params, $event ) {
// Get the event excerpt using tribe_events_get_the_excerpt
$event_excerpt = tribe_events_get_the_excerpt( $event->ID, null );
// Remove the <p> tags if present
$event_excerpt = preg_replace('/^<p>|<\/p>$/', '', $event_excerpt);
// Update the 'details' parameter in the Google Calendar link parameters
$gcal_params['details'] = $event_excerpt;
return $gcal_params;
}
add_filter( 'tec_views_v2_single_event_gcal_link_parameters', 'custom_tec_gcal_link_parameters', 10, 2 );
]]>The WC_Order::get_item_meta function is deprecated since version 3.0. Replace with wc_get_order_item_meta., referer https://domain.com/wp-admin/admin.php?page=wc_colissimo_view&s=1234567
Il faudrait remplacer la fonction get_item_meta par wc_get_order_meta
]]>chatbot-call-assistant.php
file
if ('requires_action' === $status) {
if (function_exists('chatgpt_assistant_function_handle')) {
call_user_func('chatgpt_assistant_function_handle',
[
'apiKey' => $api_key,
'threadId' => $thread_id,
'runId' => $runId,
],
$responseArray
);
}
}
I have my custom plugin for parsing the calling the function itself. You are activly developing this plugin that is why I do not want to fork it any longer but propose my ideas and provide them to you
regards
it seems since the last update this function is added to every anchor tag (#) throughout the site
function(e) {
e.preventDefault();
e = m(i, k).call(i, t.getAttribute("href"));
m(i, W).call(i, e)
}
The source seems to be your own from OceanWP here:
/wp-content/plugins/ocean-sticky-header/assets/js/sticky-header.min.js
It creates different issues. For example all custom links with anchors (#) in menus are not clickable anymore and therefore won′t open. Also different behaviors throughout the site are triggered. For example in WooCommerce when Tabs are clicked the page starts scrolling to tab anchor. This is not a default behavior and none of my Funktions does that. Before the update today it was fine I double checked it.
Please fix this as soon as possible and stop propagation of this to every element.
Thanks
]]>If i enter this in google chrome bar /product-category/product_cat=product_cat/?product_cat=grandvalira&product_cat=el-tarter it rewrites the url and goes to the requiered category. So i assume after the var search_url is executed the url should be rewritten into the userfriendly url?
I have understood that woocommerce should rewrite this url for me, but im not sure how that works.
this is the website where it is showing https://www.snowtripper.nl/
Does anyone have an idea where the problem could be? i’m at a loss.
function custom_search_bar_shortcode() {
ob_start(); ?>
<form role="search" method="get" class="woocommerce-product-search" action="<?php echo esc_url( home_url() ); ?>">
<?php
// Get top-level product categories
$product_categories = get_terms( array(
'taxonomy' => 'product_cat',
'hide_empty' => true,
'parent' => 0,
) );
if ( $product_categories ) :
?>
<select name="product_cat" id="product_cat" data-action="get_subcategories">
<option value=""><?php esc_html_e( 'Kies Land', 'text-domain' ); ?></option>
<?php foreach ( $product_categories as $category ) : ?>
<option value="<?php echo esc_attr( $category->slug ); ?>"><?php echo esc_html( $category->name ); ?></option>
<?php endforeach; ?>
</select>
<select name="product_subcat" id="product_subcat" style="display: show;" data-action="get_subsubcategories">
<option value=""><?php esc_html_e( 'Kies Skigebied', 'text-domain' ); ?></option>
</select>
<select name="product_subsubcat" id="product_subsubcat" style="display: show;">
<option value=""><?php esc_html_e( 'Kies Bestemming', 'text-domain' ); ?></option>
</select>
<button type="submit" class="button_front_search"><i class="fas fa-search"></i><?php esc_html_e( '', 'text-domain' ); ?></button>
<?php endif; ?>
</form>
<script>
jQuery(document).ready(function($) {
$('#product_cat').change(function(){
var category = $(this).val();
var action = $(this).data('action');
if(category && action){
$.ajax({
url: '<?php echo admin_url('admin-ajax.php'); ?>',
type: 'POST',
data: {
action: action,
category: category
},
success:function(data){
$('#product_subcat').html(data);
$('#product_subcat').show();
}
});
} else {
$('#product_subcat').html('<option value=""><?php esc_html_e( 'Kies Skigebied', 'text-domain' ); ?></option>');
$('#product_subsubcat').html('<option value=""><?php esc_html_e( 'Kies Bestemming', 'text-domain' ); ?></option>');
$('#product_subcat').show();
$('#product_subsubcat').show();
}
});
$('#product_subcat').change(function(){
var subcategory = $(this).val();
var action = $(this).data('action');
if(subcategory && action){
$.ajax({
url: '<?php echo admin_url('admin-ajax.php'); ?>',
type: 'POST',
data: {
action: action,
subcategory: subcategory
},
success:function(data){
$('#product_subsubcat').html(data);
$('#product_subsubcat').show();
}
});
} else {
$('#product_subsubcat').html('<option value=""><?php esc_html_e( 'Kies Bestemmingen', 'text-domain' ); ?></option>');
$('#product_subsubcat').show();
}
});
// Update form action URL based on the selected subsubcategory
$('#product_subsubcat').change(function(){
var subsubcategory = $(this).val();
var product_cat = $('#product_cat').val();
var product_subcat = $('#product_subcat').val();
var search_url = '<?php echo home_url(); ?>/product-category/';
if(product_cat) {
search_url += product_cat + '/';
}
if(product_subcat){
search_url += product_subcat + '/';
}
if(subsubcategory){
search_url += subsubcategory + '/';
}
$('.woocommerce-product-search').attr('action', search_url);
});
});
</script>
<?php
$output = ob_get_clean();
return $output;
}
add_shortcode( 'custom_search_bar', 'custom_search_bar_shortcode' );
// AJAX function to get subcategories
add_action('wp_ajax_get_subcategories', 'get_subcategories_callback');
add_action('wp_ajax_nopriv_get_subcategories', 'get_subcategories_callback');
function get_subcategories_callback() {
$category = $_POST['category'];
$subcategories = get_terms( array(
'taxonomy' => 'product_cat',
'hide_empty' => true,
'parent' => get_term_by('slug', $category, 'product_cat')->term_id,
) );
if ( $subcategories ) {
$output = '<option value="">' . esc_html__( 'Kies Skigebied', 'text-domain' ) . '</option>';
foreach ( $subcategories as $subcategory ) {
$output .= '<option value="' . esc_attr( $subcategory->slug ) . '">' . esc_html( $subcategory->name ) . '</option>';
}
echo $output;
}
wp_die();
}
// AJAX function to get subsubcategories
add_action('wp_ajax_get_subsubcategories', 'get_subsubcategories_callback');
add_action('wp_ajax_nopriv_get_subsubcategories', 'get_subsubcategories_callback');
function get_subsubcategories_callback() {
$subcategory = $_POST['subcategory'];
$subsubcategories = get_terms( array(
'taxonomy' => 'product_cat',
'hide_empty' => true,
'parent' => get_term_by('slug', $subcategory, 'product_cat')->term_id,
) );
if ( $subsubcategories ) {
$output = '<option value="">' . esc_html__( 'Kies Bestemming', 'text-domain' ) . '</option>';
foreach ( $subsubcategories as $subsubcategory ) {
$output .= '<option value="' . esc_attr( $subsubcategory->slug ) . '">' . esc_html( $subsubcategory->name ) . '</option>';
}
echo $output;
}
wp_die();
}
]]>