jonathanjam
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Trouble connecting Printify with WooCommerce site@lovingbro
Your welcome. I was editing WooCommerce, debugging the code, printing a lot of echos, seeing who’s truly at fault. I can confirm it is most likely Printify, not WooCommerce.protected function post_consumer_data( $consumer_data, $url ) {
$params = array(
'body' => wp_json_encode( $consumer_data ),
'timeout' => 60,
'headers' => array(
'Content-Type' => 'application/json;charset=' . get_bloginfo( 'charset' ),
),
);
$response = wp_safe_remote_post( esc_url_raw( $url ), $params );
if ( is_wp_error( $response ) ) {
throw new Exception( $response->get_error_message() );
} elseif ( 200 !== intval( $response['response']['code'] ) ) {
echo "<p>" . json_encode($response['response']) . "</p>";
throw new Exception( __( 'An error occurred in the request and at the time were unable to send the consumer data', 'woocommerce' ) );
}
return true;
}I removed all unrelated echos and left the one that matters. It responded with this:
{“code”:500,”message”:”Internal Server Error”}
So, Printify is sending an error code 500. If I am wrong and this is being from my own server, let me know. But, by reading the code and reading the outputs, it’s coming from Printify’s end. Specifically, from “https://api-prod.printify.com/v1/callbacks/woo/installed?domain=https://shop.jonathanuniverse.com/&user_hash=783d63df46d6bdaf“.
It would of been a lot easier if WooCommerce outputted that error from the beginning if that is the true error. Would of save me a lot of time.
Update:
Was looking it up and found this post a day ago.
Is Printify down for you guys too? 500 Internal Server Error : r/Printify
Yeah, this is most likely the problem then.I’ll mark this topic as resolved once I receive confirmation this is the problem.
- This reply was modified 3 months, 3 weeks ago by jonathanjam. Reason: Adding an update of what I discovered
Forum: Plugins
In reply to: [WooCommerce] Trouble connecting Printify with WooCommerce siteThanks. I just contacted them. Waiting for a response now.
Forum: Plugins
In reply to: [WooCommerce] Trouble connecting Printify with WooCommerce siteThat printify extension is only for calculating shipping for printify products. It’s not a way to connect it with printify. You have to connect Printify through WooCommerce OAuth. I did mentioned that I did it in in Printify, didn’t mention I did it via an extension. Here are screenshots of the screens after I clicked on the “Connect” button within printify.com.
I also paused cloudflare and still not result. Although, after I un-paused cloudflare, my SSL stopped working. So, got to fix that.