Return raw image proxy for wordpress plugin

I circumvented the issue with the following hack of images.php. <?php // Import wordpress API. require_once(‘../../../wp-load.php’); function hinews_get_image($id) { if (array_key_exists(‘mimetype’, $_GET)) { $mimetype = $_GET[‘mimetype’]; } else { return ‘No MIME type specified.’; } $options = get_option(‘homeinfo_news_options’); $parm_token = ‘?access_token=’ . $options[‘token’]; $base_url=”https://myurl.com/”; $image_url = $base_url . $id . $parm_token; $image = file_get_contents($image_url); if … Read more

Field salespeople task management

This could be built out fairly easily without a plugin and a little research. Here is a broad overview of what I would most likely do. Use the admin to add/edit/remove data Create a new custom post type called addresses (or jobs if that makes more sense) Setup custom taxonomies and custom fields to hold … Read more

How to trigger WooCommerce user profile edit change?

Try this below code add_action( ‘personal_options_update’, ‘save_user_profile_update’ ); add_action( ‘edit_user_profile_update’, ‘save_user_profile_update’ ); function save_user_profile_update( $user_id ) { update_user_meta( $user_id, ‘address’, $_POST[‘address’] ); update_user_meta( $user_id, ‘city’, $_POST[‘city’] ); update_user_meta( $user_id, ‘postalcode’, $_POST[‘postalcode’] ); }

Admin metabox with custom post type dropdown option not update choosed input after saving

The issues with your code In the eca_meta_box_function() function, the selected option is not being selected because the option‘s value is not the post ID which is being used with the selected() function in WordPress: (wrapped for clarity) <option value=”<?php echo $post->ID; ?>_<?php echo preg_replace(‘#[ -]+#’, ‘-‘ ,$post->post_title ); ?>” <!– wrapped –> <?php selected( … Read more

Plugin Options Page and Subpage

If you want to use multiple options pages for plugin, ensure that your sanitize function gets the additional missing options from the database example public function sanitize($input): array { /** My Plugin Setting Options */ $option = get_option(‘my_plugin_settings’); /** Do this for all the settings keys in your options array */ if ($input[‘setting_key’]) { $output[‘setting_key’] … Read more