ikramy
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: UBUNTU – Unable to rename wordpress theme folderwww-data:www-data on the entire wordpress site
all files -rw-r–r–
all folders drwxr-xr-xapache/php user group is: www-data:www-data
Thanks
Forum: Plugins
In reply to: [WooCommerce] WooCommerce API and qTranslateXThank you very much. I will contact qTranslateX owners then.
Forum: Fixing WordPress
In reply to: Uploading files from Media Library failsI found the solution here. Thanks
https://dustinbolton.com/wordpress-xampp-on-mac-update-permissions-problem/
Forum: Plugins
In reply to: [Yoast SEO] Disable HTML tags in META descriptionYou are right. The issue was caused by “WooCoomerce Social Media Share Buttons”.
Thank you
Forum: Plugins
In reply to: [WooCommerce] Hide the only payment gateway from checkout pageHi SunflowerSchool,
checkout/payment-method.php
if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <input id="payment_method_<?php echo $gateway->id; ?>" type="hidden" class="input-radio" name="payment_method" checked value="<?php echo esc_attr( $gateway->id ); ?>" <?php checked( $gateway->chosen, true ); ?> data-order_button_text="<?php echo esc_attr( $gateway->order_button_text ); ?>" />
Forum: Plugins
In reply to: [WooCommerce] Save cart items as multiple orders instead of one orderHello,
Is this possible please?
Forum: Plugins
In reply to: [WooCommerce] Adjust admin orders pageHi Mike,
I’m trying to edit the WooCommerce >> Orders page in the admin.
I have a number of users, and each user should be managing certain products.
I added a custom field in the product post type that holds the ID of the user.
What I need to do is, when a user logs in to WP admin and goes to WooCommerce >> Orders, I want him to ONLY see the orders that belong to his products, NOT all orders.
Thanks
Forum: Plugins
In reply to: [WooCommerce] Query products a certain user has purchased/orderedThank you
wc_customer_bought_product() works perfectly.
Forum: Plugins
In reply to: [WooCommerce] Reordering fieldsHi Mike,
Thanks for your response.
I tried:
do_action("woocommerce_checkout_init", "order_fields");
instead of:
add_filter("woocommerce_checkout_fields", "order_fields");
But it didn’t work!
Forum: Plugins
In reply to: [WooCommerce] Price field is empty in product edit modeMike, this is perfect. I just replaced WP_Query with the below and it worked.
Thanks Mike
ThanksStephan<?php global $wpdb; $rows = $wpdb->get_results( "SELECT * FROM wp_posts where post_type = 'my_vendor'" ); foreach($rows as $row){ ?> <input type="radio" name="vendor_field" value="<?php echo $row->ID; ?>" <?php if($row->ID == $value){echo 'checked';} ?> /> <?php echo get_the_title($row->ID); ?><br /> <?php }
Forum: Plugins
In reply to: [WooCommerce] Price field is empty in product edit modeHi Mike,
I tried removing the wp_reset_query but it didn’t make a difference!
Forum: Plugins
In reply to: [WooCommerce] Price field is empty in product edit modeHi Stephan,
Thanks for the quick response.
I just found that when I remove some code, it works fine.
I also noticed that when I remove the WP_Query from that code, it works fine. Seems that it is the cause of the problem but not sure why!!!
Code below:
<?php if(is_super_admin()): ?> <?php function add_meta_box_vendor() { $screens = array( 'product' ); foreach ( $screens as $screen ) { add_meta_box( 'vendor_sectionid', __( 'Vendor', 'vendor_textdomain' ), 'vendor_callback', $screen, 'side' ); } } add_action( 'add_meta_boxes', 'add_meta_box_vendor' ); function vendor_callback( $post ) { wp_nonce_field( 'vendor_save_meta_box_data', 'vendor_nonce' ); $value = get_post_meta( $post->ID, '_vendor_value_key', true ); ?> <label for="vendor_field"></label> <?php $args = array( 'post_type' => 'my_vendor' ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); ?> <input type="radio" name="vendor_field" value="<?php echo $loop->post->ID; ?>" <?php if($loop->post->ID == $value){echo 'checked';} ?> /> <?php echo get_the_title($loop->post->ID); ?><br /> <?php endwhile; wp_reset_query(); ?> <?php } function vendor_save_meta_box_data( $post_id ) { if ( ! isset( $_POST['vendor_nonce'] ) ) { return; } if ( ! wp_verify_nonce( $_POST['vendor_nonce'], 'vendor_save_meta_box_data' ) ) { return; } if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return; } if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) { if ( ! current_user_can( 'edit_page', $post_id ) ) { return; } } else { if ( ! current_user_can( 'edit_post', $post_id ) ) { return; } } if ( ! isset( $_POST['vendor_field'] ) ) { return; } $str = $_POST['vendor_field']; $my_data = sanitize_text_field( $str ); update_post_meta( $post_id, '_vendor_value_key', $my_data ); } add_action( 'save_post', 'vendor_save_meta_box_data' ); ?> <?php endif; ?>
Forum: Fixing WordPress
In reply to: Text widgets lost when transferred to a new domainHi James,
They are not in the inactive widgets.
I found this thread with some solutions
https://wordpress.stackexchange.com/questions/9076/why-is-my-database-import-losing-text-widget-dataIt seems that the regular search and replace damages some things like widgets.
Thanks for your help ??
Forum: Fixing WordPress
In reply to: Text widgets lost when transferred to a new domainNope, nothing has changed.
Forum: Fixing WordPress
In reply to: Text widgets lost when transferred to a new domainHi James,
1- Downloaded a copy of the database using phpmyadmin
2- Downloaded the entire website files
3- Updated the links in the .sql database file from the old domain to the new one
4- Uploaded the database file to the new server
5- Uploaded the files to the new server
6- Updated wp-config.php with the new databse host, db name, user name, and password.Everything works perfectly but text widgets disappeared!!
Thanks