Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter harin24

    (@harin24)

    In the custom url I removed everything before the edit.php. It works now.

    Thanks for your help.

    Thread Starter harin24

    (@harin24)

    For some reason I’m unable to type the custom url. The field has the read only property.

    Edit: Never mind I got how to edit it.

    • This reply was modified 3 years ago by harin24.
    Thread Starter harin24

    (@harin24)

    Another thing I noticed is that the other menu urls start at admin.php or edit.php or another file.php. But this url has the full site address, https://www….

    Is there a way I can manually change that link?

    Thread Starter harin24

    (@harin24)

    We’re using an add-on called memberpress courses. Usually when that add-on is activated, it creates a sub-menu under the memberpress menu. But we seperated that courses submenu so it’s easier to access.

    If I disable this plugin and leave that as a submenu, it works fine.

    We’re using the Genesis framework, with mai law pro as the child theme. I made sure no other plugin was conflicting with this by turning all the plugins off.

    If you think it would be helpful I can create a short video and link it here using loom.

    Thread Starter harin24

    (@harin24)

    So I didn’t have access to that page because another admin had restricted that plugin’s access settings to themselves. Now I have access to the settings for this plugin.

    As for the double linked menu item. All other menu items are “/wp-admin/admin.php?page=”. But this one is “/wp-admin/edit.php?post_type=”. The plugin still tries to link the url using admin.php instead of edit.php.

    Is there a way to fix this?

    Forum: Fixing WordPress
    In reply to: Admin Page access
    Thread Starter harin24

    (@harin24)

    Hey Kuldeep,

    After looking into that plugin. It turns out that plugin had settings so that it could be restricted to a certain user.

    An admin at some point in that past before me had restricted it to themselves that’s why I didn’t have access to that page.

    Thanks for your help.

    Thread Starter harin24

    (@harin24)

    Hi Vinod Dalvi,

    Good call, for some reason it was using the default search form on the phones instead of the custom one that was created. Thank you for your help.

    Regards.

    Thread Starter harin24

    (@harin24)

    After taking a look at the Memberpress WooCommerce Plus plugin’s settings. They have a setting there that marks the order as completed. Change that setting to ‘leave order as woocommerce marked it’.

    All of our products are virtual. So then I wrote my own code that always sets order statuses from ‘proccessing’ to ‘completed’.

    Thread Starter harin24

    (@harin24)

    Improved to ensure parameters are correct before passing them into any hooks.

    
    function custom_add_email_recipient( $recipient, $order ) {
    	if(is_a($order, 'WC_Order')){
    		$id = $order->get_id();
    		if(isset($id) && is_int(($id))){
    			$other_email = get_post_meta($id, '_billing_other_email', true);
    			if(!empty($other_email) && is_email($other_email)){
    				$recipient .=",".$other_email; 
    			}
    		}
    	}
        return $recipient;
    }
     
    add_filter( 'woocommerce_email_recipient_customer_completed_order', 'custom_add_email_recipient', 10, 2 );
    add_filter( 'woocommerce_email_recipient_customer_invoice', 'custom_add_email_recipient', 10, 2 );
    
    • This reply was modified 3 years, 3 months ago by harin24.
    • This reply was modified 3 years, 3 months ago by harin24.
    Thread Starter harin24

    (@harin24)

    Hey,

    incase anyone else runs into this same problem:

    Create a new checkout field, put whatever in the label, in the name field put other_email. Notes: ‘_billibg_’ gets prepended by Woocommerce automatically, and if you choose anything other than other_email, then alter it in the code below inside get_post_meta.

    Then put the following code in snippets or functions.php:

    
    function custom_add_email_recipient( $recipient, $order ) {
    	if(is_a($order, 'WC_Order')){
    		$other_email = get_post_meta($order->get_id(), '_billing_other_email', true);
    		if(is_email($other_email)){
    			$recipient .=",".$other_email; 
    		}
    	}
        return $recipient;
    }
     
    add_filter( 'woocommerce_email_recipient_customer_completed_order', 'custom_add_email_recipient', 10, 2 );
    add_filter( 'woocommerce_email_recipient_customer_invoice', 'custom_add_email_recipient', 10, 2 );
    

    In my case, I only send the email to the second address for completed order status and for the invoice. More ‘add_filter’ hooks can be used to for other order statuses such as processing, cancelled.

    Also, this code can be easily improved with some effort to accept more than one additional email separated by commas using array_map and more.

    Hope it’s helpful, cheers.

    • This reply was modified 3 years, 3 months ago by harin24.
    Thread Starter harin24

    (@harin24)

    Thanks Ian.

    Thread Starter harin24

    (@harin24)

    I was unable to resolve this using hooks from the outside, instead just edited the plugin file directly. I’m not too sure, but a possible solution could be if the developers could permanently add the following lines to the em-event-posts-admin file, By using a if statement to check if pending seats exist:

    
    <?php _e("Available",'events-manager'); ?>:<?php echo $EM_Event->get_bookings()->get_available_spaces()."/".$EM_Event->get_spaces(); ?> | 
    <?php _e("Pending",'events-manager'); ?>:<?php echo $EM_Event->get_bookings()->get_pending_spaces()."/".$EM_Event->get_spaces(); ?>
    
    Thread Starter harin24

    (@harin24)

    The reason why I had to resort to posting here was because my ticket was not getting submitted on there before for some reason. But when I tried again today it went through, thank you.

    • This reply was modified 3 years, 4 months ago by harin24.
Viewing 13 replies - 1 through 13 (of 13 total)