digberlin
Forum Replies Created
-
Forum: Plugins
In reply to: [Add-on WooCommerce - MailPoet 3] CRITICAL Uncaught TypeError on checkoutSame here
2023-07-11T09:00:51+00:00 CRITICAL Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given in /var/www/XXX/wp-content/plugins/add-on-woocommerce-mailpoet/includes/class-mpwa-place-order.php:66 Stack trace: #0 /var/www/XXX/wp-content/plugins/add-on-woocommerce-mailpoet/includes/class-mpwa-place-order.php(66): array_merge(Array, NULL) #1 /var/www/XXX/wp-content/plugins/add-on-woocommerce-mailpoet/includes/class-mpwa-place-order.php(37): MPWA_Place_Order::save_subscriber_record(Array, Array) #2 /var/www/XXX/wp-content/plugins/add-on-woocommerce-mailpoet/add-on-woocommerce-mailpoet.php(189): MPWA_Place_Order::subscribe_user() #3 /var/www/XXX/wp-includes/class-wp-hook.php(310): wc_after_checkout_validation_mpwa_subscribe(2944) #4 /var/www/XXX/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #5 /var/www/XXX/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /var/www/XXX/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(456): do_action('woocommerce_che...', 2944, Array) #7 /var/www/XXX/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1256): WC_Checkout->create_order(Array) #8 /var/www/XXX/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(507): WC_Checkout->process_checkout() #9 /var/www/XXX/wp-includes/class-wp-hook.php(308): WC_AJAX::checkout('') #10 /var/www/XXX/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) #11 /var/www/XXX/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #12 /var/www/XXX/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(96): do_action('wc_ajax_checkou...') #13 /var/www/XXX/wp-includes/class-wp-hook.php(308): WC_AJAX::do_wc_ajax('') #14 /var/www/XXX/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(false, Array) #15 /var/www/XXX/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #16 /var/www/XXX/wp-includes/template-loader.php(13): do_action('template_redire...') #17 /var/www/XXX/wp-blog-header.php(19): require_once('/var/www/theres...') #18 /var/www/XXX/index.php(17): require('/var/www/theres...') #19 {main} thrown in /var/www/XXX/wp-content/plugins/add-on-woocommerce-mailpoet/includes/class-mpwa-place-order.php in Zeile 66Forum: Plugins
In reply to: [Media Credit] User-RolesAwesome. Thank you very much.
Forum: Plugins
In reply to: [Media Credit] Credits for cropped imagesThank you!
Forum: Plugins
In reply to: [Media Credit] Credits for cropped imagesVery much appreciated 🙂
Forum: Plugins
In reply to: [Media Credit] Credits for cropped imagesThank you.
It’s a custom theme based on bootstrap.
This is how the credit is obtained in header.php (dig_getattachmentid is a function which returns the ID of an attachment from a url):if ( has_header_image() ) {
if ( Media_Credit::get_html( dig_getattachmentid ( get_header_image() ), false ) ) {
echo ‘<div class=”media-credit header-credit”>’ . Media_Credit::get_html( dig_getattachmentid ( get_header_image() ) ) . ‘</div>’;
}
}The problem is that when using the built-in crop tool within the customizer, WordPress creates a new image file (with -cropped added to the file name) which does not include the image credit from the original file. Furthermore, you can’t add the credit manually because these cropped files are hidden in the admin backend.
For example:
– the image with the ID 99 has image credits
– image 99 is supposed to be the new custom header
– image 99 is selected in the customizer, cropped using the built-in tool and saved
– the cropped image is a new image file with the ID 100 and has no image credits