Skip to content

Commit

Permalink
working start for wpml just
Browse files Browse the repository at this point in the history
  • Loading branch information
codersaiful committed May 18, 2024
1 parent 7b18011 commit 683f786
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
17 changes: 17 additions & 0 deletions admin/add_options_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@
* @link https://docs.woocommerce.com/wc-apidocs/source-function-woocommerce_wp_text_input.html#14-79 Details of woocommerce_wp_text_input() from WooCommerce
*/
function wcmmq_add_field_in_panel(){
$current_lang = apply_filters( 'wpml_current_language', NULL );
$lang = apply_filters('wpml_default_language', NULL );
if(!empty($current_lang) && !empty($lang) && $current_lang != $lang){
$message = __( 'You have to input Min max and step value in your default language product.', 'wcmmq' );
if( function_exists( 'woocommerce_wp_note' ) ){
woocommerce_wp_note([
'id' => 'wcmmq_note_for_wpml',
'class' => 'wcmmq_note_for_wpml',
'message' => $message,
'type' => 'warning',
'label' => __( 'Important:', 'wcmmq' ),

]);
}
return;
}

$is_pro = defined('WC_MMQ_PRO_VERSION');
$data_type = 'decimal';
$tip_color = 'wcmmq-tips-note';
Expand Down
7 changes: 7 additions & 0 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,13 @@ img.wcmmq-license-brand-logo {
box-sizing: border-box;
box-shadow: 0px 9px 13px 0 #0000004a;
}
/* wpml note color/style */
output#wcmmq_note_for_wpml {
color: #bf0000;
font-size: 15px;
background: #ddd;
padding: 2px 10px;
}
/********Configure Tab Area End*********/


Expand Down

0 comments on commit 683f786

Please sign in to comment.