Blog

Userwp hook troubleshooting

User function userwp_user_registration_approval($user_id) { // Check if the UsersWP plugin is active if (class_exists('UsersWP')) { // Update user meta as needed update_user_meta($user_id, 'aiowps_account_status', 'pending'); update_user_meta($user_id, 'userwp_account_status', '1'); // Get the user object $user = get_userdata($user_id); if ($user) { // Remove the 'subscriber' role if the user has it $user->remove_role('subscriber'); // Check if the 'provider' role […]

Add Provider Role WP

User add new user role Provider in wordpress Assistant To add a new user role called **"Provider"** in WordPress, you can do this programmatically by adding some custom code to your theme's `functions.php` file or through a custom plugin. This new role can have specific capabilities based on your requirements. ### Method 1: Adding a […]

Remove Subscriber Add Provider

User if ($user) { // Set the user's role to "Provider" $user->set_role('provider'); } first remove subscriber Assistant To remove the "subscriber" role from a user and set it to "provider," you can do it in two steps: 1. **Remove the "subscriber" role** (if it exists). 2. **Assign the "provider" role**. Here’s how you can modify […]

CPT not showing in export

User custom post type option not showing to export in tools export wordpress Assistant If your custom post type (CPT) isn't showing up in the "Tools > Export" section in WordPress, it might be due to how the custom post type was registered. Specifically, the issue usually comes from the `show_in_rest` or `can_export` arguments being […]

Export and Map Taxonomies

User Export custom post type taxonomies and map it to other cpt taxonomy Assistant To export taxonomies from one Custom Post Type (CPT) and map them to another CPT's taxonomy in WordPress, you can follow these steps. This will involve exporting the taxonomy terms, then reassigning or remapping them to another CPT's taxonomy using PHP. […]

CSS Optimization for Load Time

User I was just reference about hero banner , Every page has some large element that take to load time to first appear to the enduser , That’s why we have asked for remove unused css and load only require css Correct above sentence Assistant Here's the corrected version: I was referring to the hero […]

Popup After PayPal Return

User When return from PayPal after payment made to wordpress website showing some popup for a second on website Assistant The popup you see briefly after returning from PayPal could be related to one of the following reasons: ### 1. **Thank You Page Redirection** Some WordPress plugins, especially e-commerce ones (like WooCommerce), might briefly show […]

Watermark Layering Fix

User <style> body { font-family: "DejaVu Sans", "DejaVu Sans Mono", "DejaVu", sans-serif, monospace; font-size:11px; } @page { margin: 480px 50px 100px 50px; } #header { position: fixed; left: 0; top: -460px; right: 0; height: 400px; text-align: center; } #footer { position: fixed; left: 0; bottom:0; right: 0; height: 100px; font-size:11px; text-align: center; } #content { […]

WooCommerce PDF Invoice Error

User Fatal error: Uncaught WooCommercePDFInvoiceException: file_get_contents(): Passing null to parameter #2 ($use_include_path) of type bool is deprecated 8192 in /home/storm/sites/hbguq-nimsite-uk/public/wp-content/plugins/woocommerce-pdf-invoice-1/lib/dompdf/src/Helpers.php:507 Stack trace: #0 [internal function]: WooCommercePDFInvoiceHelpers::record_warnings() #1 /home/storm/sites/hbguq-nimsite-uk/public/wp-content/plugins/woocommerce-pdf-invoice-1/lib/dompdf/src/Helpers.php(838): file_get_contents() #2 /home/storm/sites/hbguq-nimsite-uk/public/wp-content/plugins/woocommerce-pdf-invoice-1/lib/dompdf/src/Css/Stylesheet.php(363): WooCommercePDFInvoiceHelpers::getFileContent() #3 /home/storm/sites/hbguq-nimsite-uk/public/wp-content/plugins/woocommerce-pdf-invoice-1/lib/dompdf/src/Dompdf.php(567): WooCommercePDFInvoiceCssStylesheet->load_css_file() #4 /home/storm/sites/hbguq-nimsite-uk/public/wp-content/plugins/woocommerce-pdf-invoice-1/lib/dompdf/src/Dompdf.php(719): WooCommercePDFInvoiceDompdf->processHtml() #5 /home/storm/sites/hbguq-nimsite-uk/public/wp-content/plugins/woocommerce-pdf-invoice-1/classes/class-pdf-send-pdf-class.php(176): WooCommercePDFInvoiceDompdf->render() #6 /home/storm/sites/hbguq-nimsite-uk/public/wp-content/plugins/woocommerce-pdf-invoice-1/classes/class-pdf-export.php(100): WC_send_pdf::get_woocommerce_invoice() #7 /home/storm/sites/hbguq-nimsite-uk/public/wp-includes/class-wp-hook.php(324): WC_pdf_export->handle_shop_order_bulk_actions() #8 /home/storm/sites/hbguq-nimsite-uk/public/wp-includes/plugin.php(205): WP_Hook->apply_filters() #9 /home/storm/sites/hbguq-nimsite-uk/public/wp-admin/edit.php(222): apply_filters() #10 {main} […]

PHP Syntax Update Fix

User Fatal error: Array and string offset access syntax with curly braces is no longer supported in /home/storm/sites/hbguq-nimsite-uk/public/wp-content/plugins/woocommerce-pdf-invoice-1/lib/barcodes/BarcodeGenerator.php on line 292 Assistant This error message indicates that your code is using the outdated curly brace `{}` syntax for accessing array or string offsets, which is no longer supported in PHP 7.4 and above. Instead, you […]